Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

PowerShell Remoting Access is Denied: How to Fix PSRemoting for Administrators Group Accounts

After successfully configuring Microsoft PowerShell PSRemoting, I was able to login with local Administrator user without any issue. But after creating another user, adding it to Administrators group then logging with it was throwing error message of Access is denied.

Screenshot of PowerShell showing the Enter-PSSession failure with the error message: 'Access is denied' for a local administrator account (vmadmin) trying to connect to a remote server 10.0.0.4 local administrators.

PS VM02 > Enter-PSSession -ComputerName 10.0.0.4 -Credential vmadmin
Enter-PSSession : Connecting to remote server 10.0.0.4 failed with the following error message : Access is denied. For 
more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName 10.0.0.4 -Credential vmadmin
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (10.0.0.4:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

PS VM02 >

To fix this issue go to Computer Management >> Local Users and Groups >> Groups >> Remote Management Users group and Add users, you want to login through PowerShell PSRemoting.

Note: Just adding user to Administrators group is not sufficient.

Screenshot of Computer Management showing local user vmadmin is a member of the Administrators group and Remote Mangement Users, confirming the account has necessary local privileges despite the PSRemoting 'Access is denied' error.

Part 1: Bypass the Domain Wall: How to Enable PSRemoting WinRM in a Workgroup Environment
Part 2: PowerShell Remoting Access is Denied: How to Fix PSRemoting for Administrators Group Accounts
Part 3: PowerShell PSRemoting Fix: Bypassing "Access is Denied" for Privileged Admin Commands

After fixing group permissions try Enter-PSSession command with different remote administrator users. It will be successful this time.

PS VM02 > Enter-PSSession -ComputerName 10.0.0.4 -Credential vmadmin
[10.0.0.4]: PS C:\Users\vmadmin\Documents> exit
PS VM02 >

Screenshot showing a successful Enter-PSSession command to the remote server 10.0.0.4 using the local administrator account 'vmadmin', evidenced by the remote PS prompt [10.0.0.4]: PS C:\Users\vmadmin\Documents>.

Useful Articles
Installing, importing and using any module in powershell
Microsoft PowerShell: Check Windows license activation status
Find next available free drive letter using PowerShell
Copy Files with PowerShell Remoting WINRM Protocol
Powershell Find application window state minimized or maximized
How to Install and Use Microsoft PowerShell on Linux
Configure PowerShell remoting between Windows and Linux
Get-PSRepository WARNING Unable to find module repositories
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send
Creating an internal PowerShell module repository
How to sign PowerShell ps1 scripts
PowerShell Convert MAC address to Link-local address IPv6
PowerShell fix repair The trust relationship between this workstation and the primary domain failed
Resovled issue with PowerShell - Trust relationship Rejoin computers in domain without restart
POWERSHELL PS REMOTING BETWEEN STANDALONE WORKGROUP COMPUTERS  
POWERSHELL DSC XACTIVEDIRECTORY ERROR - A NETBIOS DOMAIN NAME MUST BE SPECIFIED 
DSC (DESIRED STATE CONFIGURATION) : DEPLOYING ACTIVE DIRECTORY 
THE POWERSHELL XACTIVEDIRECTORY PROVIDER DOES NOT EXIST AT THE POWERSHELL MODULE PATH NOR IS IT REGISTERED AS A WMI PROVIDER
PowerShell remoting over HTTPS using self-signed SSL certificate
Configure Powershell WinRM to use OpenSSL generated Self-Signed certificate

Go Back

Comment

Blog Search

Page Views

13869636

Archive

Follow me on Blogarama