PowerShell v2 does have a -WindowStyle parameter, but it's a case of the PowerShell console window hiding itself. That is, the console window is still visible for a short moment before it hides itself (same with minimizing or maximizing).In contrast, my ps1exec utility is a GUI program, so it can st...
Too bad I didn't see this one before I wrote one myself...http://www.westmesatech.com/misctools.htmlps1exe32 (or ps1exe64) lets you execute a PowerShell script, and it lets you specify the console window title, the console window initial state (e.g., minimized or hidden), and a couple of other featu...
Hi falle, I don't know why the code would paste as all one line in PrimalScript--it didn't do that in notepad when I tried it. Fortunately, you don't have to know JScript to use it. As posted, it will not rename any folders -- it will only output the directories it will rename. As it uses the WScrip...
Hi falle, if I understand your needs, here is a JScript script that should work: var fso = new ActiveXObject("Scripting.FileSystemObject"); function process(folder) { if (folder.Path.search(/datamydocs$/i) != -1) { WScript.Echo(folder.Path + " -> mydocsold"); //folder.N...
OK, I did some testing. Here is the test script: $list = @("dc1","dc2","dc3","dc4","dc5","dc6") $searcher = [WMISearcher] "" $searcher.Scope.Options.Impersonation = "Impersonate" function test-searcher { foreach ($comp...
Hi josiahwww, Another alternative is to use the .NET System.Management.ManagementObjectSearcher class directly -- its PowerShell type shortcut is [WMISearcher]. For example: $searcher = [WMISearcher] "" $searcher.Scope.Options.Impersonation = "Impersonate" if (($username -ne &quo...
Hi jodaman102,I have never had good success using the Win32_Product class (using PowerShell or otherwise). It is glacially slow when it does work, and on top of that, it only reports Windows Installer packages.As an alternative, I recommend querying the registry (HKLMSOFTWAREMicrosoftWindowsCurrentV...