Search found 138 matches

by abqbill
Tue Aug 04, 2009 4:16 am
Forum: VBScript
Topic: Service Tag Script
Replies: 2
Views: 1336

Service Tag Script

Hi michaeljtrent,

Are you needing the Dell service tag? Here's how I do it:

Code: Select all

function hex(n) {
  return n AbqBill2009-08-04 11:17:06
by abqbill
Mon Jul 27, 2009 12:16 pm
Forum: PowerShell
Topic: How to schedule hidden PowerShell task
Replies: 10
Views: 10076

How to schedule hidden PowerShell task

Cool. What's the URL?Thanks,Bill
by abqbill
Mon Jul 27, 2009 7:05 am
Forum: PowerShell
Topic: How to schedule hidden PowerShell task
Replies: 10
Views: 10076

How to schedule hidden PowerShell task

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...
by abqbill
Mon Jul 27, 2009 1:55 am
Forum: PowerShell
Topic: How to schedule hidden PowerShell task
Replies: 10
Views: 10076

How to schedule hidden PowerShell task

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...
by abqbill
Wed Jul 08, 2009 1:19 pm
Forum: VBScript
Topic: Search drive for a given folder. If found Rename.
Replies: 4
Views: 1534

Search drive for a given folder. If found Rename.

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...
by abqbill
Sat Jul 04, 2009 8:53 am
Forum: VBScript
Topic: Search drive for a given folder. If found Rename.
Replies: 4
Views: 1534

Search drive for a given folder. If found Rename.

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.Name = "mydocsold";  ...
by abqbill
Fri Jul 03, 2009 3:04 am
Forum: PowerShell
Topic: Good Technique
Replies: 7
Views: 3179

Good Technique

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 ($computer in $list) {     $searcher.Scope.Path = "$computerrootcimv2"     $searcher.Q...
by abqbill
Thu Jul 02, 2009 8:58 am
Forum: PowerShell
Topic: Good Technique
Replies: 7
Views: 3179

Good Technique

This has me curious...I wonder which solution performs better? I'll have to do some testing when I get back to my office.Bill
by abqbill
Thu Jul 02, 2009 1:58 am
Forum: PowerShell
Topic: Good Technique
Replies: 7
Views: 3179

Good Technique

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 "") -and ($password -ne ...
by abqbill
Thu Jul 02, 2009 1:40 am
Forum: PowerShell
Topic: PowerShell WMI Problems
Replies: 8
Views: 5619

PowerShell WMI Problems

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...