Windows Powershell Remote Commands Not Working -RPC Server Unavailable

Page 1 of 2 12 LastLast
  1.    #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 ComputerSystem Spec

  2. Kari's Avatar
    Posts : 16,145
    Windows 10 Pro
       #2

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

  3. Bree's Avatar
    Posts : 11,959
    10 Home x64 (1903) (10 Pro on 2nd pc)
       #3

    mountaincabbage said: View Post
    .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 ComputersSystem Spec

  4. bro67's Avatar
    Posts : 7,040
    Mac OS High Sierra 10.14.3 Beta (18D21c)
       #4

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

  5.    #5

    Kari said: View Post
    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 ComputerSystem Spec

  6. Kari's Avatar
    Posts : 16,145
    Windows 10 Pro
       #6

    mountaincabbage said: View Post
    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 ComputerSystem Spec


  7.    #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 ComputerSystem Spec

  8. Kari's Avatar
    Posts : 16,145
    Windows 10 Pro
       #8

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

  9.    #9

    Thanks :)
      My ComputerSystem Spec

  10. Kari's Avatar
    Posts : 16,145
    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:

    Click image for larger version. 

Name:	image.png 
Views:	1 
Size:	272.3 KB 
ID:	195595

    Trigger:

    Click image for larger version. 

Name:	image.png 
Views:	1 
Size:	272.7 KB 
ID:	195596

    Action:

    Click image for larger version. 

Name:	image.png 
Views:	14 
Size:	146.2 KB 
ID:	195597

    Conditions, clear everything:

    Click image for larger version. 

Name:	image.png 
Views:	1 
Size:	322.7 KB 
ID:	195598

    Settings, clear everything except the highlighted items:

    Click image for larger version. 

Name:	image.png 
Views:	1 
Size:	320.3 KB 
ID:	195599

    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 ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Solved Run Multiple Commands In Powershell? in Performance & Maintenance
Hi, I have three drives in my PC. Two of them are SSD's and the third one is a mechanical HDD. I like to optimize them using Powershell. However, as it stands now. I'm running the commands separately for each of my drive, i.e. 1.)...
Hi there I'm trying to create a VM on a HYPER-V 2016 server system. The HYPER-V server installed OK, network seems working and gives IP address 192.168.1.12 and all the DNS stuff seems fine so networking should be OK and enabled remote access on...
Hi, Several months ago I set up a VPN server using Windows 10 (the method I used is described in this tutorial: How To Setup a VPN in Windows 10 - YouTube) This has been working fine until last week when I suddenly was unable to connect to my...
Source: Remote Server Administration Tools for Windows 10 | Ask Premier Field Engineering (PFE) Platforms
I have spent many hours for the last two days trying to get the Store and several apps re-registered and working. On other forums which I have been directed to, such as MS TechNet, much of the advice and links I have been given either generate...
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 00:25.
Find Us