Rebooting a workstation with failed auto-login



    Hello all not sure this is the correct place to post, but here it goes:

    I am creating my 1st Powershell script. My target is XP thin clients that have dropped from our domain.

    I need to:
    1. Unlock the write filter
    2. Reboot
    3. Remove from domain
    4. Re-join Domain
    5. Lock write filter
    6. Reboot

    Sounds easy enough. I was able to write the script and it tested perfectly, however when I tried it on actual Thin clients that have dropped I have a bug I cannot figure out.

    The Thin clients are set to auto login with a restricted domain user account. When the trust fails, the auto-login will fail with a message about not being able to connect to a domain controller.

    My reboot code:
    psexec -sd \\$TargetComputer -u $TargetComputer\administrator -p $global:admpwd  shutdown -r -t 00

    I have tried with the –sd and without.  Psexec is remote executing the shutdown command successfully, but Shutdown.exe  Is reporting “The device is not ready.” Everything I have searched for says this was fixed in SP2. All of our thin clients are at SP3.

    Has anyone seen this before?
    Or is there another way to send a reboot other than shutdown.exe?

    mercredi 29 février 2012 18:51

Toutes les réponses