ITJS2015 Posted November 10, 2015 Posted November 10, 2015 Im Hoping someone could help me I would like to shutdown my desktops at the end of the day via a scripts or a schedule task, now I have one in place which involves shutdown -m \\computername -s and IP address but for some strange reason it has stopped working and has an access denied 5 on it. Now all I want is something simple to do it in bulk Can someone help me Cheers
Michael Posted November 10, 2015 Posted November 10, 2015 Just create a scheduled task using GPP. You'd generally be better off using /f /s (force, shutdown). Not sure what /m does top of my head.
bladedanny Posted November 10, 2015 Posted November 10, 2015 Just create a scheduled task using GPP. You'd generally be better off using /f /s (force, shutdown). Not sure what /m does top of my head. /m is for machine. Used when running the script remotely.
GuyJD Posted November 10, 2015 Posted November 10, 2015 yeah I'd go with a scheduled task over Group policy you might want to also add in the option to only do it if the computer has been idle for a while in case anyone is pulling a late one.
mrwoberts Posted November 10, 2015 Posted November 10, 2015 What happens when you connect to the ipc first? net use \\test-pc shutdown /s /t 60 /m \\test-pc /d p:0:0 As an opinion, I might prefer to sleep these pcs, but you may need a separate app for that.
GuyJD Posted November 10, 2015 Posted November 10, 2015 I've got 2 separate power policies for my desktops that switch from one to the other depending on the time, so during the day they are all set to high performance keeping them on and ready to use but at 5pm they all switch to a 2nd power profile that puts them to sleep if they aren't being used, come 7am the policy switches back to high performance and they cycle continues. I'd love to go down the switch them off every night route but there are too many teachers here that leave work open over night and expect it to still be there in the morning even though they haven't saved it 1
mrwoberts Posted November 10, 2015 Posted November 10, 2015 @GuyJD Nice idea, thanks for sharing. To be honest, the cost savings of shutting down pcs are minimal nowadays. I did some research and tested physical machine power usage when in use, asleep, shutdown. I discovered that most machines, including the monitors, barely used 1w when asleep. As you say, forcing a shutdown can cause other problems so I opt to sleep machines.
mrwoberts Posted November 10, 2015 Posted November 10, 2015 @GuyJD Just curious if you have a third power profile for holiday (school closed) periods?
GuyJD Posted November 10, 2015 Posted November 10, 2015 @mrwoberts I don't, being a primary school it's quite easy for myself and the premises staff to go round to make sure they are all off, Also I find myself working most holidays so being able to turn them on and know that they'll stay on for the rest of the day is quite handy for pushing out policy and software updates.
mrwoberts Posted November 10, 2015 Posted November 10, 2015 That makes sense. If you wanted to explore that option you could use WakeOnLan, which can also be used to wake machines up in the middle of night to carry out certain tasks... 1
ITJS2015 Posted November 10, 2015 Author Posted November 10, 2015 I keep on getting access denied(5) any ideas
mrwoberts Posted November 10, 2015 Posted November 10, 2015 Where are issuing these commands from? A cmd prompt on the DC ? What happens when you attempt to access the machines C$ drive? e.g. net use * \\test-pc\C$ Did you try the ipc connection I mentioned in an earlier post?
ITJS2015 Posted November 10, 2015 Author Posted November 10, 2015 I have a windows 8 machine which did work shutting them down via a script using that method now it doesn't work at all, I have managed to use \\machine\c$ but with credentials Is that the problem ? I still have my old script on the server which still says access denied
mrwoberts Posted November 10, 2015 Posted November 10, 2015 Is that the problem ? I still have my old script on the server which still says access denied That depends... Just to be clear, you are using a standard pc, Windows 8.0 os, and running a script (.bat / .cmd) to remotely shutdown pcs across your network? Do you have an identical admin account on this Win8 pc, to the rest of the target pcs? The password must also be the same, and that account must not be disabled on the target pc. If you can access the pc using interactive credentials, then try saving those credentials in your credential manager, or try the /savecred option with the 'net use' command. if these pcs are on a domain then I'd lean towards controlling these PCs from your Domain Controller. Alternatively, investigate the route mentioned in responses above and create smart schedules for power schemes... I know you say this has worked in the past, but I never rely on that kind of logic, as you and I both know that things always change whether you are in control of it or not.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now