Changing WMI/WQL results output - wmi

Now this is a odd one but as I don't know WMI/WQL I hope someone can help and spot a simple mistake..
I need to find out if a system is a domain controller or not - simple with WMI
select DomainRole from Win32_ComputerSystem gets the data.
However the tool I'm using to run and test the output seems not to understand it needs to look at the values under the object(s) so is it possible to get the result within the object key/name/1st level result?
To provide a example:
If I run that query I get the computer name back.
If I run select Name from Win32_NetworkProtocol I get all the protocol details back.
eg
MSAFD Tcpip [TCP/IP]
RSVP TCP Service Provider
So am I wrong or the tool?

To answer my own question. It doesn't look like we can change how/what is returned.
My issue was caused by the tool were using returning the wrong data.

Related

Export Microstrategy grid data in text format to a FTP server

Can anybody please let me know whether it is possible to export microstrategy grid data in text format to a FTP server (required access will be provided). If not directly, then can we use some kind of java coding/web services to achieve this. I don't want the process but want to understand whether this can be achieved or not?
Thanks in Advance!
You can retrieve report results (and build a new report from scratch at that) via the SDK and from there you can process the data to your liking, i.e. transform & upload to a ftp-server.
Possibly easier would be to create a file-subscription and store the file to a specific directory where you automatically pick it up and deliver it to your ftp.
There might be other solutions as well, but Yes is the answer to the "Yes/No" part of your question.

Transport Rule Logical And for Exchange 2010

Good Afternoon,
I have exhausted my googling and best-guess ideas, so I hope someone here has an idea of whether this is possible or not.
I am using Exchange Server 2010 (vanilla) in a test environment and trying to create a Hub Transport Rule using the Exchange Management Console. The requirements of the rules filtering are similar to the following scenario:
1.) If a recipient's address matches (ends with) "#testdomain.com" AND (begins with) "john"
2.) If the sender's address matches (ends with) "#testdomain.com"
3.) Copy the message to the "SupervisorOfJohns#testdomain.com" mailbox
I have no problems doing items 2 and 3, but I cannot figure out how to get item 1 in the same condition. I have come across some threads that simply concluded that MS goofed on this, but I am hesitant to fault them for something which seems like it should be really straightforward. I must be missing something. Expressions I have tried so far...:
1.) (^john)(#testdomain.com$)
2.) ^(john)(#testdomain.com)$
3.) (^john)#testdomain.com
4.) ^john #testdomain.com$
5.) ^(john)#testdomain.com
If you use the interface and +Add them as two separate entries, it treats them as an OR clause (if a recipient address begins with "john", OR it ends with "#testdomain.com"). As you can see from my simplistic attempts, I have barely any clue what can/should work in this case. Any suggestions or ideas would be appreciated.
Respectfully,
B. Whitman
Here's what I ended up using:
john\w*#testdomain.com
The reasoning behind the question is that I'm trying to make a service to catch certain e-mails and do some processing with them. I also wanted to restrict the senders/recipients to certain domains (though some checking will also be done with the processing service). Thanks to hjpotter92 for his solutions!

Best practice for creating an unalterable report file in c++

I am currently developping a windows application who test railroad equipments to find any defaults.
Utility A => OK
Utility B => NOK
...
This application will check the given equipment and generate a report.
This report needs to be written once, and no further modifications are allowed since this file can be used as working proof for the equipment.
My first idea was ta use pdf files (haru lib looks great), but pdf can also be modified.
I told myself that I could obsfuscate the report, and implement a homemade reader inside my application, but whatever way I store it, the file would always be possibly accessed and modified right?
So I'm running out of ideas.
Sorry if my approach and my problem appear naive but it's an intership.
Thanks for any help.
Edit: I could also add checksums for files after I generated them, and keep a "checksums record file", and implement a checksums comparison tool for verification? just thought about this.
I believe the answer to your question is to use any format whatosever, and use a digital signature anybody can verify, e.g., create a gnupg, get that key signed by the people who require to check your documents, upload it to one of the key servers, and use it to sign the documents. You can publish the documents, and have a link to your public key available for verification; for critical cases someone verifying must be trust your signature (i.e., trust somebody who signed your key).
People's lives depend on the state of train inspections. Therefore, I find it hard to believe that someone expects you to solve this problem only using free-as-in-beer components.
Adobe supports a strong digital signature model. If you buy into their technology base, you can create PDF's that are digitally signed, and are therefore tamper-evident, as the consumer can check for the signature.
You can, as someone else pointed out, use GNUpg, or for that matter OpenSSL, to implement your own signature scheme, but railroad regulators are somewhat less likely to figure out how to work with it.
I would store reports in an encrypted/protected datastore.
When a user accesses a report (requests a copy, the original is of course always in the database and cannot be modified), it includes the text "Report #XXXXX". If you want to validate the report, retrive a new copy from the system using the Report ID.

HTTP request to test if requesting works fine?

Is there any "gauge page" in Internet or some general procedure of querying some popular pages like Google's, so that it return constant known output?
I want to write a Unit test, which will succeeded if internet is working and data is transferring correctly.
UPDATE
I need namely HTTP to check all stack, including my app's part.
I like www.something.com (note the www). It hasn't changed since I found it, and the output is really small.
I don't think it's official or anything though.

How do I get the "bucket id" that winqual uses if I have a minidump file or exception structure? (Windows c++)

There are a few related questions on SO - but have not found the answer -
I would like to generate a "signature"/bucket id to report a minidump/crash back to our issue tracking system. Since MS already does this with "bucket ids" I figured I could just re-use their bucket/signature generation.
Can I get that ID from either a top level filter or the _EXCEPTION_POINTERS object I have inside the filter or the _MINIDUMP_EXCEPTION_INFORMATION structure or from the minidump itself?
This is a C++ application.
There's a paper talking about how Microsoft guys create bucket id at the first place (, and yes, of course, this paper is from Microsoft). You don't really need to reverse engineering exactly the same bucketing algorithm they use. It's the idea that works.
The paper can be found at http://www.sigops.org/sosp/sosp09/papers/glerum-sosp09.pdf
They also do a slide since this is a SIGOPS paper: http://www.sigops.org/sosp/sosp09/slides/glerum-slides-sosp09.pdf
Not sure which bucket id you need. The numeric id is assigned by the server and you can find it after the report is sent by looking at the event log. Look for event ID 1001 in the application event log.
To find the bucket id in string format use windbg or cdb and use the !analyze command.
Note that for the purpose of actually bucketing you will probably want to look at WATSON_STAGEONE_URL rather than BUCKET_ID.