About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When Enter-PSSession, New-PSSession or Invoke-Command ends with "Access is denied", the target answered and refused the account. Microsoft's pages use the heading "ERROR: ACCESS IS DENIED"; the wording of the message on your screen, such as a PSRemotingTransportException line, is the tool's own. That separates it from the "verify that the specified computer name is valid" failure, which is a network and listener fault. Microsoft's remoting page lists "ERROR: ACCESS IS DENIED" under many different headings; the cause that applies is found by reading the target's session configuration permission and the account's group membership.
What the message means
PowerShell remoting connects to a session configuration, the endpoint on the target. Microsoft's requirements page says "the security descriptor on the session configuration determines who has access to the session configuration and who can use it to connect." The same page says the descriptors on the default Microsoft.PowerShell and Microsoft.PowerShell32 configurations "only allow access to members of the Administrators group". It also says a connecting account must be a member of the Administrators or Remote Management Users group on the remote computer. The two statements differ by endpoint: the output on Microsoft's Enable-PSRemoting page for the PowerShell 7 endpoints PowerShell.7 and PowerShell.7.3.0 lists BUILTIN\Remote Management Users AccessAllowed next to Administrators. Our own reading is that the Windows PowerShell default endpoint is administrators-only while endpoints that Enable-PSRemoting creates in PowerShell 7 also admit Remote Management Users; read the target's permission list rather than assume.
Other remoting errors on Microsoft's Windows Admin Center page start with the same pattern, "Connecting to remote server" followed by a computer name and "failed with the following error message".
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The account is not in a group the endpoint admits | Works for administrators only | Compare the Permission of the endpoint with the account's groups |
| Connecting by default endpoint as a non-administrator | A standard user is refused | The Microsoft.PowerShell permission lists only BUILTIN\Administrators |
| Account from another domain or a workgroup computer | An administrator on the target is still refused | Standard-user token; no LocalAccountTokenFilterPolicy value |
| No credential passed | The current identity is used | Retry with -Credential |
| Remote access switched off | Everyone remote is refused, local sessions work | A Network_Deny_All entry in the permission |
| Not elevated for a local-computer operation | ERROR: Access is denied. You need to run this cmdlet from an elevated process. |
PowerShell was not started with Run as administrator |
Prove the cause before changing anything
All of these only read. Steps 2 to 5 run on the target in an elevated PowerShell, as a member of Administrators, which Microsoft's page requires for them.
1. Check that the network path works. Test-WSMan -ComputerName app01.example.com sends an identification request. If it answers, reachability is fine and the fault is authorisation. If it does not, use WinRM "can't complete the operation. Verify that the specified computer name is valid": check the name, the port, the service, the listener and the firewall rule.
2. Read the endpoints and who may use them. The Permission column lists the groups and users:
Get-PSSessionConfiguration
3. List the two groups.
Get-LocalGroupMember -Group "Administrators"
Get-LocalGroupMember -Group "Remote Management Users"
4. Read the token setting. Microsoft's page describes LocalAccountTokenFilterPolicy in this key. Our own reading: a missing value means the default behaviour applies.
Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name LocalAccountTokenFilterPolicy
5. Look for the deny entry. Microsoft's page says Disable-PSRemoting adds a Network_Deny_All entry to all session configurations. Find it in the Permission text from step 2.
6. Retry with an explicit credential. For a computer in another domain, Microsoft's FAQ page says credentials can be required even when the current user is a member of the Administrators group on the local and remote computers:
Enter-PSSession -ComputerName app01.example.com -Credential EXAMPLE\admin01
Fix
Change one thing, then repeat the failing command.
Admit the account through the Remote Management Users group
Use this only where step 2 shows the endpoint you connect to lists BUILTIN\Remote Management Users.
First save the current state:
Get-LocalGroupMember -Group "Remote Management Users" > rmu-before.txt
Risk: the next command gives the account EXAMPLE\ci-deploy remote-session rights on this computer to every endpoint that admits that group.
Add the member:
Add-LocalGroupMember -Group "Remote Management Users" -Member "EXAMPLE\ci-deploy"
Only if you need to back out, and knowing that EXAMPLE\ci-deploy can then no longer connect through the endpoints that admit the group, remove the member and then list the group and compare it with rmu-before.txt.
Risk: the next command takes the remote-session rights away from EXAMPLE\ci-deploy on this computer; that account can no longer connect through the endpoints that admit the group.
Remove-LocalGroupMember -Group "Remote Management Users" -Member "EXAMPLE\ci-deploy"
Change the permission of an endpoint
First save the current state:
Get-PSSessionConfiguration -Name Microsoft.PowerShell | Format-List -Property * > psconfig-before.txt
Disruptive step: the next command opens a property sheet for the security descriptor of the Microsoft.PowerShell endpoint, and Microsoft's page says the change takes effect only when the WinRM service is restarted. Our own reading: the restart cuts remoting sessions that are open on this computer. Whoever you give Execute permission can then run commands remotely on it.
Run it:
Set-PSSessionConfiguration -Name Microsoft.PowerShell -ShowSecurityDescriptorUI
Microsoft's cmdlet page says users "must have at least Execute(Invoke) permission". Give that and nothing wider.
Only if you need to back out, and knowing that the account you added then loses the access the entry gave it, remove the entry you added so the list matches the Permission in psconfig-before.txt. Because psconfig-before.txt holds the Permission text and not a security descriptor string, the restore is by hand to that list.
Disruptive step: the back-out takes permissions away from whoever you removed, and it opens the same property sheet and, on Microsoft's page, takes effect only when the WinRM service is restarted. Our own reading: the restart cuts remoting sessions that are open on this computer.
Set-PSSessionConfiguration -Name Microsoft.PowerShell -ShowSecurityDescriptorUI
Then run Get-PSSessionConfiguration -Name Microsoft.PowerShell and compare its Permission with psconfig-before.txt.
Allow remote administrators with a standard token
Microsoft's page warns that the LocalAccountTokenFilterPolicy entry "disables user account control (UAC) remote restrictions for all users of all affected computers". Our own advice: do not use it where a narrower route works, such as an account in Remote Management Users. Use it only where the saved file below shows no LocalAccountTokenFilterPolicy line, so that the back-out is a plain removal.
First save the current state:
Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System > uac-policies-before.txt
Risk: the next command sets the registry value to 1. Every remote administrator on this computer then runs with the full administrator token.
Set the value, using the form on Microsoft's page:
$newItemPropertySplat = @{
Name = 'LocalAccountTokenFilterPolicy'
Path = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
PropertyType = 'DWord'
Value = 1
}
New-ItemProperty @newItemPropertySplat
Only if you need to back out, and only because the saved file shows no LocalAccountTokenFilterPolicy line, so the original state is no value, and knowing that remote administrators on this computer then go back to the filtered token: remove the value, then read the key again and compare it with uac-policies-before.txt.
Risk: the next command deletes the LocalAccountTokenFilterPolicy registry value. Remote administrators on this computer go back to the filtered token.
Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name LocalAccountTokenFilterPolicy
If the saved file does show a value, do not use this step; no command for that case is given here.
Remote access was switched off
Microsoft's session-configuration page says Enable-PSRemoting or Enable-PSSessionConfiguration allows remote users to use the session configurations again after Disable-PSRemoting. That is a change to remote access for the whole computer, so it is left to whoever switched remote access off and decided to restore it.
Example (illustrative): ci01 runs a deployment as EXAMPLE\ci-deploy, a plain domain account, against app01.example.com and gets Access is denied. Test-WSMan answers, so the network is fine. On app01, Get-PSSessionConfiguration shows microsoft.powershell admitting only BUILTIN\Administrators, while PowerShell.7 lists BUILTIN\Remote Management Users AccessAllowed. ci-deploy is in neither group. After saving the group list, an administrator adds ci-deploy to Remote Management Users, and the deployment now names the endpoint: Invoke-Command -ComputerName app01.example.com -ConfigurationName PowerShell.7 -ScriptBlock { hostname }.
Confirm the fix
- The command that failed now ends without
Access is denied. Get-LocalGroupMember -Group "Remote Management Users"or the endpoint permission shows only the entries you meant to add.- If the next error is about names, TrustedHosts or an SPN, remoting authorisation is fixed; see PowerShell remoting fails with 0x80090322 or asks for TrustedHosts: fix the SPN or use HTTPS, not a wildcard.
What to watch afterwards
- Keep the saved lists with the change record, so the group and endpoint permissions can be compared later.
- Prefer a named group for remote operators over wider token settings.
- When a scheduled job fails with the same words from Group Policy, see Group Policy Preferences scheduled task not applying: event 4098 "did not apply because it failed with error code" 0x80070005 Access is denied.
Read next
Related articles you may want next.
- TroubleshootingWinRM "can't complete the operation. Verify that the specified computer name is valid": check the name, the port, the service, the listener and the firewall ruleWinRM says verify the computer name is valid and a firewall exception is enabled? Test the name, port 5985, service, listener and firewall rule.Read article
- TroubleshootingPowerShell remoting fails with 0x80090322 or asks for TrustedHosts: fix the SPN or use HTTPS, not a wildcardEnter-PSSession fails with WinRM error 0x80090322 when the HTTP service principal name belongs to another account. The TrustedHosts error appears when Kerberos cannot be used. Fix the SPN, connect by name, or set up HTTPS rather than trusting every host.Read article
- TroubleshootingGroup Policy Preferences scheduled task not applying: event 4098 "did not apply because it failed with error code" 0x80070005 Access is deniedA user GPP scheduled task fails with event 4098 and 0x80070005. Read the event, then clear the logged-on user's security context option.Read article
Risks and limits
- These commands have not been run or lab-tested.
- Microsoft's pages describe the Administrators and Remote Management Users rules slightly differently; the permission list on the target is the deciding fact.
Add-LocalGroupMemberandGet-LocalGroupMemberact on local groups. Our own reading: a domain controller has no local groups, so they do not apply there.- The saved
psconfig-before.txtrecords thePermissiontext, not a security descriptor string. - The exact
Access is deniedsentence on your screen, for example with aPSRemotingTransportException, varies by tool; the Microsoft heading is "ERROR: ACCESS IS DENIED".
Sources
- about_Remote_Troubleshooting — Microsoft Learn, 19 January 2024, accessed 3 December 2026
- about_Remote_Requirements — Microsoft Learn, 7 November 2025, accessed 3 December 2026
- about_Session_Configurations — Microsoft Learn, 19 January 2024, accessed 3 December 2026
- PowerShell Remoting FAQ — Microsoft Learn, 9 December 2025, accessed 3 December 2026
- Windows Admin Center known issues — Microsoft Learn, 12 August 2025, accessed 3 December 2026
- Enable-PSRemoting — Microsoft Learn, no date shown, accessed 3 December 2026
- Get-PSSessionConfiguration — Microsoft Learn, no date shown, accessed 3 December 2026
- Set-PSSessionConfiguration — Microsoft Learn, no date shown, accessed 3 December 2026
- Test-WSMan — Microsoft Learn, no date shown, accessed 3 December 2026
- Add-LocalGroupMember — Microsoft Learn, no date shown, accessed 3 December 2026
- Remove-LocalGroupMember — Microsoft Learn, no date shown, accessed 3 December 2026
- Get-LocalGroupMember — Microsoft Learn, no date shown, accessed 3 December 2026
- Get-ItemProperty — Microsoft Learn, no date shown, accessed 3 December 2026
- New-ItemProperty — Microsoft Learn, no date shown, accessed 3 December 2026
- Remove-ItemProperty — Microsoft Learn, no date shown, accessed 3 December 2026
This article was originally published on .