yo_bee
asked on
WMIC Call Win32Shutdown returns Invalid method Parameter(s)
When I run: WMIC /node:@"C:\computerlist.tx t" OS Call Win32Shutdown(9,0)
It returns
Why is this?
Also How to I suppress (Y/N)? prompt?
It returns
ERROR:
Description = Invalid method Parameter(s)
Description = Invalid method Parameter(s)
Why is this?
Also How to I suppress (Y/N)? prompt?
ASKER
I have a file of all my servers and I want to use the @filename paramerter.
I have used VBS for querying WMI, but never to CALL. thought it would be easier.
I am more than happy to use PS or VBS.
I will try the link now.
I have used VBS for querying WMI, but never to CALL. thought it would be easier.
I am more than happy to use PS or VBS.
I will try the link now.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
@wwwb0n3
The second link pointed me in the right direction.
Now I need to find a way to suppress the Y/N Prompt
The second link pointed me in the right direction.
Now I need to find a way to suppress the Y/N Prompt
Take a look at this link and the /interactive switch.
http://technet.microsoft.com/en-us/library/cc787035(WS.10).aspx
try adding /nointeractive to the end of your command line.
http://technet.microsoft.com/en-us/library/cc787035(WS.10).aspx
try adding /nointeractive to the end of your command line.
ASKER
Thanks for the pointers. I found the suppress prompt (y/n)?
It is /Nointeractive.
It is /Nointeractive.
I would also suggest looking at the failfast switch... This way it would ping each workstation/server in your list before executing the command. So add the following just after WMIC.
example:
WMIC /FAILFAST:ON /NODE:
example:
WMIC /FAILFAST:ON /NODE:
ASKER
Will do. Thanks for the additional advice
an example using PowerShell:
http://www.infotechguyz.com/cmd/powershellshutdownlist.html