Windows Powershell Remote Commands Not Working -RPC Server Unavailable

Page 1 of 2 12 LastLast

  1. Posts : 11
    Windows 10
       #1

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable


    Hi All,

    So I'm looking for a way to remote shutdown multiple windows PCs. I was recommended in another thread to use the Stop Computer command in powershell. I've been trying to get this to work with one PC this morning, but have not had any success.

    Here is the issue I am getting:
    Stop-Computer : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    At Z:\2 - keep\Powershell\stopseanpc.ps1:1 char:1
    + Stop-Computer -ComputerName "DESKTOP-P7D90PC" -Force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (DESKTOP-P7D90PC:String) [Stop-Computer],
    COMException
    + FullyQualifiedErrorId : StopComputerException,Microsoft.PowerShell.Commands.StopComp
    uterCommand

    I've tried following this tutorial:
    How to Fix Error in Windows - Driver Easy
    Among others, I've made sure all the services are running, permissions are set etc.

    Could it be to do with our router's settings? Do I need to configure ports?

    Thanks,
    Sean
      My Computer


  2. Posts : 17,661
    Windows 10 Pro
       #2

    First thing to test is Firewall. Temporarily disable any Firewall on target computer and try again.
      My Computer


  3. Posts : 31,666
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    mountaincabbage said:
    .I've been trying to get this to work with one PC this morning, but have not had any success.

    Here is the issue I am getting:
    Stop-Computer : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    Is the PC running the 32-bit version of 1803, os build 17134? If so, it may be related to this known bug that only affects 32-bit 1803. As yet, MS have not fixed this one.

    1803 creating a system image fails with RPC server error 0x800706BA
      My Computers


  4. Posts : 9,790
    Mac OS Catalina
       #4

    Use WOL and a Remote Shutdown Agent. PsShutdown - Windows Sysinternals | Microsoft Docs
      My Computer


  5. Posts : 11
    Windows 10
    Thread Starter
       #5

    Kari said:
    First thing to test is Firewall. Temporarily disable any Firewall on target computer and try again.
    Hi Kari,

    Thanks for replying again, I have disabled windows firewall on both PC's, set execution policy to unrestricted, attempted to add the -Credential prompt, but I am continuing to get the following error:
    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
    on
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Comm
    ands.StopComputerCommand

    I've tried entering with and without quotations - unsure if this matters, but it doesn't appear to.

    Any ideas?

    Thanks,
    Sean
      My Computer


  6. Posts : 17,661
    Windows 10 Pro
       #6

    mountaincabbage said:
    Any ideas?
    On target computer, change these services from manual start (or disabled) to automatic start (no delay), restart target computer and check that they are all running, then try again:
    • Remote Access Auto Connection Manager
    • Remote Access Connection Manager
    • Remote Procedure Call (RPC)
    • Remote Procedure Call (RPC) Locator
    • Remote Registry
    • Windows Remote Management

    Kari
      My Computer


  7. Posts : 11
    Windows 10
    Thread Starter
       #7

    Hi Kari,

    I've done all of that and I'm still getting the same issue. I've tried all the above on a separate target PC and still the same.

    Any ideas?

    Thanks,
    Sean
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
       #8

    I have an idea, let me test it first, I will post here when done.
      My Computer


  9. Posts : 11
    Windows 10
    Thread Starter
       #9

    Thanks :)
      My Computer


  10. Posts : 17,661
    Windows 10 Pro
       #10

    In your other thread, you mentioned you had tried a scheduled task but it did not work.

    I tested now, creating a task to force shutdown at certain time, exported it to three virtual and two physical machines. Task worked without any issues on all of them

    Let's check you configured the task correctly.

    First, select Create Task, do not use Create Basic Task.

    New task, I've highlighted all important items. General tab:

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable-image.png

    Trigger:

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable-image.png

    Action:

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable-image.png

    Conditions, clear everything:

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable-image.png

    Settings, clear everything except the highlighted items:

    Windows Powershell Remote Commands Not Working -RPC Server Unavailable-image.png

    The task shown in above screenshots would force computer to shutdown daily at midnight (00:00), starting today. As I mentioned, I tested this now on five machines forcing them to shut down at certain time, as it is afternoon here I used 16:30 (4:30 PM) as trigger. To my satisfaction I saw all virtual and physical machines to shut down within 30 seconds after specified time.

    Should work.

    Kari
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:05.
Find Us




Windows 10 Forums