Search found 13898 matches

by jvierra
Thu Apr 10, 2008 9:18 am
Forum: VBScript
Topic: WMI HBA Provider to enumerate
Replies: 8
Views: 9914

WMI HBA Provider to enumerate

A little research shows that your message is correct. The "Unable to detect any HBA API enabled adapters" message says you have no adapters or that your adapter is not supported under HBA. The DLLs are alway in System32 on W2K3 and later. The MOF will only activate when a supported fiberchanel adapt...
by jvierra
Thu Apr 10, 2008 8:23 am
Forum: VBScript
Topic: WMI HBA Provider to enumerate
Replies: 8
Views: 9914

WMI HBA Provider to enumerate

Check for installation of components: dir %systemroot%system32wbemhbaapi.* You should see hbaapi.mof and hbaapi.dll in this folder if the WMI support has been installed. Check vendor docs to see how to install CIM/WMI support. Each vendor is different. Adapter must be installed and operational along...
by jvierra
Thu Apr 10, 2008 6:15 am
Forum: VBScript
Topic: I have an ampersand in an input file
Replies: 9
Views: 3600

I have an ampersand in an input file

I will again - you can use them but, as Don warned, they will probably cause you problems in teh future in other ways. Luckily this time it was only in tracking down the issue. Be careful about using computer names and account names that are teh same. If you use WINS it will cause issues that are ha...
by jvierra
Wed Apr 09, 2008 7:07 am
Forum: Windows PowerShell
Topic: connecting to Informix db
Replies: 12
Views: 9125

connecting to Informix db

The reader reads a rowset with columns. The collections all have a "Count" property that can be looked at for the number of columns. The reader objects all have "FieldCount" property. I also noticed that -le should ne -lt as it is a zero based collection. while($reader.read()) {   for ($i=0;$i -lt $...
by jvierra
Wed Apr 09, 2008 6:23 am
Forum: VBScript
Topic: Office 2007 WMI Scripting
Replies: 1
Views: 2298

Office 2007 WMI Scripting

Here is another that should work: You need to change the MSAPPS11 to MSAPPS12 strComputer = "." Set objWMIService = GetObject("winmgmts:" & strComputer   & "rootMSApps11") Set colSettings = objWMIService.ExecQuery ("Select * from Win32_OutlookCOMAddin") For Each strSetting in colSettings     Wscript...
by jvierra
Tue Apr 08, 2008 5:26 am
Forum: Windows PowerShell
Topic: computer asset inventory
Replies: 59
Views: 36265

computer asset inventory

Here is a jump start:

Code: Select all

gwmi -win32_product | convertto-html  -head "<link href='style.css' rel='stylesheet' type='text/css' />" -property vendor,name,installlocation > products.html

It may not be what you are looking to do but it does demonstrate some ways of approaching output.
by jvierra
Tue Apr 08, 2008 1:55 am
Forum: VBScript
Topic: Script / Policy For Home Folders
Replies: 7
Views: 2474

Script / Policy For Home Folders

Parking an event on the server that monitors files would work but if there is a lot of file creation activity it might pose an issue for performance. What the poster is trying to do can and should be done with Group Policy. The biggest issue, as Don has already pointed out, is clearing the malware f...
by jvierra
Mon Apr 07, 2008 6:04 am
Forum: Windows PowerShell
Topic: ADSI ldap connection
Replies: 6
Views: 19142

ADSI ldap connection

A little clarification might help her. The NET 2.0 "DirectorySearcher" class is a logical inplementaion of the standard LDAP/COM/API search mechanisms for AD. As Don suggested above, searching on an indexed item does not cause a load on AD. I ran the above in a loop and compared it to direct access ...
by jvierra
Mon Apr 07, 2008 5:29 am
Forum: Windows PowerShell
Topic: ADSI ldap connection
Replies: 6
Views: 19142

ADSI ldap connection

For completeness - as a one-liner.

Code: Select all

	
((New-Object DirectoryServices.DirectorySearcher "(&(objectcategory=person)(objectclass=user)(sAMAccountname=$env:username))").FindOne()).GetDirectoryEntry()
	
by jvierra
Mon Apr 07, 2008 4:56 am
Forum: Windows PowerShell
Topic: ADSI ldap connection
Replies: 6
Views: 19142

ADSI ldap connection

I found the dmissing code file. I also simplified it to just this one case and wrapped as a function for convenience. The code in the function runs stand-alone also. This function makes one call to AD and searches using an indexed item. It is as fast as anything that can access AD. I don't expect an...