So I’m looking for a way to remote shutdown multiple windows PCs. I did post this initally on tenforums, but I think I will have better luck on this forum.
So far I have:
Stopped windows defender on both PC’s, changed execution policy to unrestricted on both PC’s, checked all services to make sure they are running, followed this guide:
Did have a RPC error until I disabled windows defender, I assume I will need to add ports once I get this working.
The issue I am having now is this:
attempted to add the -Credential prompt, but I am continuing to get the following error (tried with and without):
Stop-Computer : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At C:\Users\Render 1\Documents\stopseanpc.ps1:1 char:1
- Stop-Computer -ComputerName DESKTOP-P7D90PC -Credential DESKTOP-P7R59 …
- CategoryInfo : NotSpecified: ( [Stop-Computer], UnauthorizedAccessExcepti
- FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Comm
I’ve tried entering with and without quotations - unsure if this matters, but it doesn’t appear to.