Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » ------- PsShutdown -----
------- PsShutdown ----- [message #344547] Tue, 15 December 2009 06:38 Go to next message
WildPacket  is currently offline WildPacket
Messages: 130
Registered: July 2009
Senior Member
Trying to force a reboot domain wide for about 2000 XPP PCs using the
following ...http://technet.microsoft.com/en-ca/sysinternals/bb897541. aspx

Using the Domain Admin Account from a DC running Windows 2003 64Bit SP2


Keep getting this error message

Couldn't access PCXXXXXX:
The network path was not found.

Make sure that the default admin$ share is enabled on PCXXXXXX.

If PCXXXXXX is already performing a shutdown operation you must
abort it before issuing a different command.

I can ping the PC. I have imported all computers into a TXT file and running
the command against that file. From 2000 PCs only 15/20 got rebooted.

I have noticed other people also posted the similar issue but no solid
solution.

Advise Please.

Thank you
Re: ------- PsShutdown ----- [message #344571 is a reply to message #344547] Tue, 15 December 2009 07:17 Go to previous messageGo to next message
pbbergs  is currently offline pbbergs  United States
Messages: 1024
Registered: July 2009
Senior Member
The only way we have successfully had reboots work consistently is with the
code below. Put it into a script and pass a value to it, the value is the
server to reboot. I have no experience with psshutdown. I have built in
e-mail out put that I haven't included so you can remove the unused
variables in the code below.

To call the script below:
cscript your_script.vbs servername

If you are seriously rebooting 2000 machines all at once you are doing your
enterprise a big disservice. You are going to pummel every network device,
etc... This is an EXTREMELY BAD IDEA!!!

Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''''
' Program - RemoteReboot.vbs '
' Author - Paul Bergson '
' Date Written - 08/15/07 '
' Description - Is a more drastic remote reboot '
''''''''''''''''''''''''''''''''''''''''''''''''''
Dim OpSysSet
Dim OpSys
Dim strComputer
Dim iMsg
Dim iConf
Dim Flds
Dim strSubject
Dim strHTML

on error resume next

strComputer = WScript.Arguments.Item(0) 'Get server name

If WScript.Arguments.Count = 1 Then
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}\\" _
& strComputer _
& "\root\cimv2").ExecQuery("select * from Win32_OperatingSystem
where Primary=true")
For Each OpSys in OpSysSet
OpSys.Reboot()
Next
Else
Wscript.Echo "Server Name required. Reboot operation Aborted!"
Wscript.Quit
End If

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4
Microsoft's Thrive IT Pro of the Month - June 2009

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.

"WildPacket" <WildPacket@discussions.microsoft.com> wrote in message
news:98986D11-F9A3-4D9C-9017-214583F511EA@microsoft.com...
> Trying to force a reboot domain wide for about 2000 XPP PCs using the
> following ...http://technet.microsoft.com/en-ca/sysinternals/bb897541. aspx
>
> Using the Domain Admin Account from a DC running Windows 2003 64Bit SP2
>
>
> Keep getting this error message
>
> Couldn't access PCXXXXXX:
> The network path was not found.
>
> Make sure that the default admin$ share is enabled on PCXXXXXX.
>
> If PCXXXXXX is already performing a shutdown operation you must
> abort it before issuing a different command.
>
> I can ping the PC. I have imported all computers into a TXT file and
> running
> the command against that file. From 2000 PCs only 15/20 got rebooted.
>
> I have noticed other people also posted the similar issue but no solid
> solution.
>
> Advise Please.
>
> Thank you
>
>
RE: ------- PsShutdown ----- [message #344596 is a reply to message #344547] Tue, 15 December 2009 07:39 Go to previous messageGo to next message
Eric Westfall  is currently offline Eric Westfall
Messages: 6
Registered: December 2009
Junior Member
Not sure why psshutdown would return that error on so many of your computers.
Have you tried running native commands to see if they work where psshutdown
does not?

shutdown /m \\hostname /r /f /t 00

I would also make sure that you are able to attach to the admin$ share on
some of the computers that are returning the error:

net use \\hostname\admin$

If that works you could write a PowerShell script to iterate through a file
and call a remote shutdown command. This can also be accomplished using a
VBScript as well, I've attached an example script that uses standard WMI
classes to restart a list of computers in a file.

Option Explicit
On Error Resume Next

Dim objFSO, objSourceFile
Dim colNamedArguments
Dim strSourceFile

Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set colNamedArguments = WScript.Arguments.Named

If colNamedArguments.Exists("SourceFile") Then
strSourceFile = colNamedArguments.Item("SourceFile")
Else
strSourceFile = "C:\Restart-Hosts.txt"
End If

If objFSO.FileExists(strSourceFile) Then
Set objSourceFile = objFSO.OpenTextFile(strSourceFile, ForReading)

Do Until objSourceFile.AtEndOfStream
strComputer = objSourceFile.ReadLine

Call RestartComputer(strComputer)
Loop

objSourceFile.Close
Set objSourceFile = Nothing
End If

Public Function RestartComputer(strComputer)
' Function Description
'
' Restarts a specified computer.
'
' Parameters
'
' strComputer - Specifies the target computer to restart
'
' Return Value(s)
'
' None

Dim objWMIService, objOperatingSystem
Dim colOperatingSystem

Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & _
"\root\cimv2")
Set colOperatingSystem = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem")

For Each objOperatingSystem In colOperatingSystem
objOperatingSystem.Reboot
Next

Set colOperatingSystem = Nothing
Set objWMIService = Nothing
End Function


"WildPacket" wrote:

> Trying to force a reboot domain wide for about 2000 XPP PCs using the
> following ...http://technet.microsoft.com/en-ca/sysinternals/bb897541. aspx
>
> Using the Domain Admin Account from a DC running Windows 2003 64Bit SP2
>
>
> Keep getting this error message
>
> Couldn't access PCXXXXXX:
> The network path was not found.
>
> Make sure that the default admin$ share is enabled on PCXXXXXX.
>
> If PCXXXXXX is already performing a shutdown operation you must
> abort it before issuing a different command.
>
> I can ping the PC. I have imported all computers into a TXT file and running
> the command against that file. From 2000 PCs only 15/20 got rebooted.
>
> I have noticed other people also posted the similar issue but no solid
> solution.
>
> Advise Please.
>
> Thank you
>
>
Re: ------- PsShutdown ----- [message #344800 is a reply to message #344571] Tue, 15 December 2009 10:49 Go to previous message
WildPacket  is currently offline WildPacket
Messages: 130
Registered: July 2009
Senior Member
Thanks Paul.

I fire a reboot at 1:00 am once a month.



"Paul Bergson [MVP-DS]" wrote:

> The only way we have successfully had reboots work consistently is with the
> code below. Put it into a script and pass a value to it, the value is the
> server to reboot. I have no experience with psshutdown. I have built in
> e-mail out put that I haven't included so you can remove the unused
> variables in the code below.
>
> To call the script below:
> cscript your_script.vbs servername
>
> If you are seriously rebooting 2000 machines all at once you are doing your
> enterprise a big disservice. You are going to pummel every network device,
> etc... This is an EXTREMELY BAD IDEA!!!
>
> Option Explicit
> ''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Program - RemoteReboot.vbs '
> ' Author - Paul Bergson '
> ' Date Written - 08/15/07 '
> ' Description - Is a more drastic remote reboot '
> ''''''''''''''''''''''''''''''''''''''''''''''''''
> Dim OpSysSet
> Dim OpSys
> Dim strComputer
> Dim iMsg
> Dim iConf
> Dim Flds
> Dim strSubject
> Dim strHTML
>
> on error resume next
>
> strComputer = WScript.Arguments.Item(0) 'Get server name
>
> If WScript.Arguments.Count = 1 Then
> Set OpSysSet = GetObject("winmgmts:{(Shutdown)}\\" _
> & strComputer _
> & "\root\cimv2").ExecQuery("select * from Win32_OperatingSystem
> where Primary=true")
> For Each OpSys in OpSysSet
> OpSys.Reboot()
> Next
> Else
> Wscript.Echo "Server Name required. Reboot operation Aborted!"
> Wscript.Quit
> End If
>
> --
> Paul Bergson
> MVP - Directory Services
> MCTS, MCT, MCSE, MCSA, Security+, BS CSci
> 2008, 2003, 2000 (Early Achiever), NT4
> Microsoft's Thrive IT Pro of the Month - June 2009
>
> http://www.pbbergs.com
>
> Please no e-mails, any questions should be posted in the NewsGroup This
> posting is provided "AS IS" with no warranties, and confers no rights.
>
> "WildPacket" <WildPacket@discussions.microsoft.com> wrote in message
> news:98986D11-F9A3-4D9C-9017-214583F511EA@microsoft.com...
> > Trying to force a reboot domain wide for about 2000 XPP PCs using the
> > following ...http://technet.microsoft.com/en-ca/sysinternals/bb897541. aspx
> >
> > Using the Domain Admin Account from a DC running Windows 2003 64Bit SP2
> >
> >
> > Keep getting this error message
> >
> > Couldn't access PCXXXXXX:
> > The network path was not found.
> >
> > Make sure that the default admin$ share is enabled on PCXXXXXX.
> >
> > If PCXXXXXX is already performing a shutdown operation you must
> > abort it before issuing a different command.
> >
> > I can ping the PC. I have imported all computers into a TXT file and
> > running
> > the command against that file. From 2000 PCs only 15/20 got rebooted.
> >
> > I have noticed other people also posted the similar issue but no solid
> > solution.
> >
> > Advise Please.
> >
> > Thank you
> >
> >
>
>
> .
>
Previous Topic:Authentication problems when DC is down
Next Topic:Disabling prompts for third party software updates
Goto Forum:
  


Current Time: Sat Jan 20 08:29:45 MST 2018

Total time taken to generate the page: 0.04018 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software