Trying to run a simple command such as "start "https://www.youtube.com" does nothing on my Windows 10 VM. I ran the "EnableRemotePS" command in the portal and inside the VM. When running the command inside the VM, it outputs this:

New-NetFirewallRule : Cannot create a file when that file already exists.
At line:2 char:1

  • New-NetFirewallRule -Name "Allow WinRM HTTPS" -DisplayName "WinRM HTT ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ResourceExists: (MSFT_NetFirewallRule:root/standardcimv2/MSFT_NetFirewallRule) [New-NetFirewallRule], CimException
  • FullyQualifiedErrorId : Windows System Error 183,New-NetFirewallRule
  • WSManFault
    Message
    ProviderFault
    WSManFault
    Message = The WS-Management service cannot perform the configuration operation. A listener with Address=* and Transport=HTTPS configuration already exists. You have to delete the existing listener first in order to be able to create it with the same Address and Transport values.

    Error number: -2144108493 0x80338033
    The WS-Management service cannot create the resource because it already exists.

    I've spoken with support and they told me to try "Enable-PSRemoting -Name 'RobbertPC' -ResourceGroupName 'DOOTDOOTDOOT' -Protocol https -OsType Windows" and i get the error of:

    Enable-PSRemoting : A parameter cannot be found that matches parameter name 'Name'.
    At line:1 char:19

  • Enable-PSRemoting -Name 'RobbertPC' -ResourceGroupName 'DOOTDOOTDOOT' ...
  • ~~~~~
  • CategoryInfo : InvalidArgument: (:) [Enable-PSRemoting], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.EnablePSRemotingCommand
  • I am not sure where to go from here

    Enable-PSRemoting doesn't have a -Name parameter.
    Can you read following documentation to see how it can be used.
    If you use:

    Enable-PSRemoting -Force  
    

    it will enable remote powershell from domain and private networks. You need to update your firewall rules manually to enable access from public networks as well.

    Hope this helps.

    @Jacob Alvarado Any update on the issue?

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

    Thanks.