I recently created a script for checking running services using the GetObject("WinNT://" & computer) method. It uses a .filter method to only get "Service" items. I have used similar scripts for querying other items from a computer. However, I can't seem to find a list of everything that I should be able to query from a computer using this connection (prior to the filter)
Would someone be able to point me in the correct direction for finding out all of the possible properties I can access when using this type of connection?
Check out the following section in MSDN:
ADSI Objects of WinNT
It describes the available objects and their methods and properties.
Related
I am trying to get the information of all the files related to an instance of ibm bpm but the following query does not work for me and there is no error in the javascript console either. I am using ECM Document List and in configuration I am adding a variable which contains the query.
"SELECT cmis:name, IBM_BPM_Document_FileNameURL,IBM_BPM_Document_UserId FROM IBM_ WHERE IBM_BPM_Document_ProcessInstanceId = 75774"
Thanks
I would assume that you are using and external ECM server and not the embedded ECM that comes along with IBM BPM/BAW.
Looking at the problem, I would approach the debugging in the following order;
Use a relevant ECM browser (ACCE in case of Filenet) to check if the
documents have a property that holds the value for the instanceID.
Because, by default external ECM servers don't have such a document
property.
If the document has such a property, then use that in the
"WHERE" clause of the query. If it doesn't then talk to whoever
maintains the ECM environment to create such a property and make
sure that is set properly (to the correct instanceId) for the
documents.
Another solution if you have access to it can be using the "BPM Document List" and "BPM File Uploader" which has the feature (as a configuration option) to associate documents with the current process instance.
I have a requirement to detect all users from local and Active Directory(if present) in Windows.
I have found that C API: NetQueryDisplayInformation() has also the option to retrieve the information from a "serverName", which is presumably an Active Directory which can be queried.
But how do I find out if ActiveDirectory is available/ and it's name ?
Thanks.
This information is available in WMI. In the Win32_ComputerSystem class (there will be a single instance per computer) has a Domain property containing the domain's name.
Another way of finding out domain name (if present) is to use WIN API ::DsGetDcName()
This one returns information about Active Dir server name in DOMAIN_CONTROLLER_INFO struct.
You get there all the domain information you need. Much sympler than using WMI :-)
Is there a way locate the server with the PDCE role using VBScript? I know I can use an NSLOOKUP and capture its output
nslookup -type=all _ldap._tcp.pdc._msdcs.mydomain.com
I want to use VBScript wihout calling external programs and it must run on a Windows 7 workstation (32 and 64bit) without additional software!
Thanks.
you can use NETDOM.EXE tool on server
netdom query /domain:DOM fsmo
Where DOM is my Netbios domain name
You can use DSQUERY.EXE tool
dsquery server -hasfsmo schema
(the five roles are: schema, rid, name, infr and pdc)
Determining FSMO Role Holders seems to be a good source
(Edited)
Here is an example of VBScript doing that using ADSI.
To determine the PDC Master you must query the fSMORoleOwner attribute on the partition corresponding to your domain.
Here is a sample VBS (visit http://adcoding.com/ for more information):
Set objDomDn = GetObject("LDAP://dc=concorp,dc=contoso,dc=com")
strfsmoRoleOwner = objDomDn.Get("fsmoRoleOwner")
Set objPDCfsmo = GetObject("LDAP://" & strfsmoRoleOwner)
Set objPDCfsmoParent = GetObject(objPDCfsmo.Parent)
Wscript.Echo objPDCfsmoParent.Get("dnsHostName")
I am trying to verify whether a particular user exists on the local computer. The one solution that I can do is parsing the output of command Net user . But is there any better solution than this?
You can possibly use WMI with a query such as "select * from Win32_UserAccount where LocalAccount = True" or similar. If you are just looking for a specific account you can be able to restrict the WMI query more. See Win32_UserAccount. You may also just be able to use GetObject (which may be more efficient), but I don't know how to formulate that.
You can follow the template/code at http://snippets.dzone.com/posts/show/6967 (which is not relating to user accounts :-) to setup/create the WMI ActiveX object, execute the query, and enumerate the results.
Happy coding!
Where can I find the IIS object schema? All I found from MSDN was a picture of the class hierarchy.
To be clear, I want to configure IIS through either WMI or ADSI and I'm looking for something like the Active Directory schema, only for IIS. I want a list of all the objects I can configure, which objects they can be contained in and what their properties are.
While I can't point you to a definitive document, you might find this even better: WMI code creator:
http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&DisplayLang=en
I've used this tool to query IIS WMI objects and it will even script the queries or WMI method calls for you in C# (I used them as examples).
If you run it on a machine with IIS installed, you'll see the root\MicrosoftIISv2 namesspace, which has tons of queryable objects in it, and all their properties and methods. You are probably looking for something like the IIsWebVirtualDirSetting object - try starting with that as it's got most of the properties you'll see on the IIS config panel.
Can't you find some information here : http://msdn.microsoft.com/en-us/library/aa737439.aspx ?