Unable to Enable Powershell Remoting

Akhil V N 31 Reputation points
2022-05-31T16:44:06.983+00:00

Hi All

Im trying to enable powershell remoting, via "Enable-PsRemoting ", but i get the below error

207149-image.png

remove-item : Access is denied.
At line:69 char:21

  • ... remove-item -path "$securityIDPath" -recurse -force
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Remove-Item], InvalidOperationException
  • FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.RemoveItemCommand
Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2022-05-31T17:35:09.913+00:00

    We need to investigate the reason for the 'access denied' error with the help of some monitoring tools. I suggest you to go with 'Process Monitor' recommended by Microsoft. You can download the tool here: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
    Open the tool and try again to enable PSRemoting. Find out which registry key is contacted when running the cmdlet. If it says like 'ACCESS DENIED', visit the key and take the ownership of the key first and try again. Here is how you would see the details in Process Monitor application

    207077-image.png

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. T. Kujala 8,761 Reputation points
    2022-05-31T17:35:59.463+00:00

    Hi @AkhilVNarayanan-2504,

    Make sure the winrm service is running in all the destination systems.

    Verify that there is no firewall preventing your attempts.


  2. GARRE AKHIL 20 Reputation points
    2024-08-08T11:18:51.5333333+00:00

    @@AkhilVNarayanan-2504 iam facing the same issue but iam unable to take ownership for that path

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.