Site Home»Wiki Dashboard

Recently changed pages

Date and Time 
Last Edited By:quux  ( 30 - days ago )

Fragmentation 
Last Edited By:quux  ( 61 - days ago )

Remotely change IPs en masse 
Last Edited By:quux  ( 297 - days ago )

70.293 (Plan/maintain W2003 Network) 
Last Edited By:quux  ( 370 - days ago )

Enumerate Computers 
Last Edited By:quux  ( 437 - days ago )

Sleep ten seconds 
Last Edited By:quux  ( 457 - days ago )

Microsoft technology links 
Last Edited By:quux  ( 482 - days ago )

Reference Links 
Last Edited By:quux  ( 553 - days ago )

Security comparisons (Operating Systems, Browsers, Web Servers) 
Last Edited By:quux  ( 580 - days ago )

WMIC Snippets 
Last Edited By:quux  ( 646 - days ago )

More »  

Recently Attached Files

hamstring-stretch2.JPG [View]
Uploaded by: quux (687 - days ago)

hamstring-stretch1.JPG [View]
Uploaded by: quux (687 - days ago)

buttocksstretch.gif [View]
Uploaded by: quux (687 - days ago)

piriformisgirl.gif [View]
Uploaded by: quux (687 - days ago)

More »

Newly added pages  

Remotely change IPs en masse
Author: quux  ( 297 days ago )

70.293 (Plan/maintain W2003 Network)
Author: quux  ( 370 days ago )

Security comparisons (Operating Systems, Browsers, Web Servers)
Author: quux  ( 580 days ago )

Stretching for the cube doughboy
Author: quux  ( 687 days ago )

nix
Author: quux  ( 689 days ago )



Recent comments

Guest Windows 7 has the "timeout" command

TIMEOUT [/T] timeout [/NOBREAK]

Description:
This utility accepts a timeout parameter to wait for the specified
time period (in seconds) or until any key is pressed. It also
accepts a parameter to ignore the key press.
97 days ago . Page:  Sleep ten seconds
Guest Still useful 770 days later.


Thanks!!
139 days ago . Page:  HomePage
Ran (Guest) Great page! Thanks a lot for sharing!!!
165 days ago . Page:  WMIC Snippets
Guest Great work. REALLY appreciate you sharing this.
468 days ago . Page:  WMIC Snippets
James - Guest (Guest) Excellent beginners guide into WMI, thankyou!
655 days ago . Page:  WMIC Snippets
Chris J (Guest) (Guest) Here's another couple -- for those managing Virtual Server, get stats on running servers. Good example of how to query things there aren't an alias for and which live in a different namespace:

WMIC /NODE:remote_computer_name /NAMESPACE:\\root\vm\virtualserver PATH VirtualMachine GET

WMIC /NODE:remote_computer_name /NAMESPACE:\\root\vm\virtualserver PATH VirtualMachine GET Name,Uptime,PhysicalMemoryAllocated

This gives the equivalent to the VBS script, so should give folk an idea what to do to translate WMIC commandlines to scripts and vice-versa.

strComputer = "remote_computer_name"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\vm\virtualserver")
Set colVMs = objWMIService.ExecQuery("SELECT * FROM VirtualMachine",,48)
For Each vm in colVMs
Wscript.Echo vm.name & ":: Physical Memory Allocated: " & vm.PhysicalMemoryAllocated & " bytes)"
Next
682 days ago . Page:  WMIC Snippets
Guest This is awesome.. but for some reason &apos does not work.. I had to replace it with ' BUT AWESOME nevertheless...
740 days ago . Page:  ping arp subnet
quux (Guest) Are you saying that the *exact* format I gave returns immediately? I have never seen that to be true; it's crafted specifically not to do so.
786 days ago . Page:  Sleep ten seconds
F.D.Castel (Guest) Ping could be unreliable (sometimes it returns immediately on my LAN).

I found CHOICE.exe a safer alternative:

choice /c yn /n /d y /t 10 > nul
786 days ago . Page:  Sleep ten seconds
quux Hi Will:

Sorry it took me so long to see this comment and respond. Are you running the script from an account which is a member of Administrators?
875 days ago . Page:  Windows Updates
Will (Guest) Awesome script, though I'm having problems running it remotely on Vista machines. I get the following problem via psexec

6 update(s) found. 6 eligible for install by this script.
(This script will NOT download/install updates with I, H, N, or L properties.)
(Updates with the E property will be installed if /accepteula arg was given.)

Installing the updates. Again, it takes time.
C:\forinstall.vbs(265, 17) Microsoft VBScript runtime error: Permission denied
900 days ago . Page:  Windows Updates
Damir (Guest) Thanks for great info.
I linked to WMIC Snippets in my blog. I hope you dont mind that reference is just fantastic.
Like yourself I also use windows and *nixes and to be honest I prefer linux, but nevertheless I got tired of always listening how inferior cmd is to *nix shell, so I wrote a blog post on that few days back.
http://www.damirkucic.com/2009/07/cmdexe-tribute-to-old-friend.html
I hope I'm not to arrogant linking to it in comment but it's so "connected" with your thoughts on quuxutils (I'm linking too soon) page that I just had to.

Anyway thanks again for fantastic reference and some of your stuff is definitely bookmark.
910 days ago . Page:  HomePage
quux (Guest) Rob, thanks for mentioning the || operator. I don't use it enough, I admit.

But it doesn't really fit well in this script, because I often change the -n argument to 2 or more. In that way I can send multiple pings to the address, but still indicate success (host is up and reachable) if one or more pings get through.
977 days ago . Page:  Ping
rob.wiese Hey! Nice web site. You and I are solving similar sysadmin problems.

You can simplify your ping test and use actual host names by using the logical_or "||" or logical_and "&&" symbols.

ping -n 1 %1 > nul || @goto pingfail
goto ping success

Focus passes through the || only if ping fails (ie errorlevel 1).

Steven Wettberg's Alive.exe program returns errorlevels for several different types of failures: ttl expired, bad destination, etc. So if you're testing for more types of failures, Alive.exe might be a better choice than ping.exe - ymmv.

Alive.exe might be a good candidate for your quuxutils collection.


Rob W.
977 days ago . Page:  Ping
Rob (Guest) Nice intro!!

Any ideas on returning a processes componenents, paths and versions? Like listdlls would produce?

Rob
986 days ago . Page:  WMIC Snippets
preetsangha@gmail.com+(Guest) Just a thought - could to speed it up slightly by doing them in parallel? cmd /c netsh - perhaps?
1050 days ago . Page:  NETSH many ports
preet Sangha (Guest) Excellent article. I've posted a link back here from my blog

- Preet
http://preetsangha.blogspot.com
1050 days ago . Page:  WMIC Snippets
Guest (Guest) Does anyone know how to delimit the ampersand? \ does not work. I need to get a mac address based on the pnpdeviceid but the string is breaking on the &.


wmic nic where "PNPDeviceID=PCI\VEN_xxxx&Dev_xxx&..." get macaddress

gets error: dev_xxxx is not recognized as an interna or external command.

(this repeat for each part of the string after the &


Help!
1087 days ago . Page:  WMIC Snippets
shop Most valuable info i have seen on the net regarding WMI!!
1134 days ago . Page:  WMIC Snippets
More »