Enable session configurations on the local computer.

To allow all users of the computer to use remoting, use Enable-PSRemoting. This is an advanced cmdlet designed for use by system administrators to manage custom session configurations for their users.

      Enable-PSSessionConfiguration  [[-Name] String[]]
        [-Force] [-SecurityDescriptorSddl String] [-SkipNetworkProfileCheck]
           [-Confirm] [-WhatIf] [CommonParameters]

       The names of session configurations to enable.
       Enter one or more configuration names. Wildcards are permitted.
       You can also pipe a string containing a configuration name or a session configuration object.

       Suppress all user prompts.
       By default, you are prompted to confirm each operation.

       Replace the security descriptor on the session configuration with the specified security
       descriptor. If you omit this parameter, Enable-PSSessionConfiguration just deletes the
       "deny all" item from the security descriptor.

       Enable the session configuration when the computer is on a public network.
       Enables a firewall rule for public networks that allows remote access  only from computers in
       the same local subnet. By default, Enable-PSSessionConfiguration fails on a public network.
       This parameter is designed for client versions of Windows. (PowerShell 3.0+)

       Prompt for confirmation before executing the command.

       Describe what would happen if you executed the command without actually
       executing the command.

       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
       -OutBuffer -OutVariable.

To run this cmdlet, requires starting PowerShell in elevated mode "Run as administrator"

Enable-PSSessionConfiguration removes the "Deny_All" setting from the security descriptor of the affected session configurations, turns on the listener that accepts requests on any IP address, and restarts the WinRM service.

Beginning in PowerShell 3.0, Enable-PSSessionConfiguration also sets the value of the Enabled property of the session configuration (WSMan:\<computer>\PlugIn\<SessionConfigurationName>\Enabled) to "True". However, it does not remove or change the "Network_Deny_All" (AccessMode=Local) security descriptor setting that allows only users of the local computer to use to the session configuration.


Re-enable the default PowerShell session configuration on the computer:
PS C:> Enable-PSSessionConfiguration

Re-enable the MaintenanceShell and AdminShell session configurations on the computer:
PS C:> Enable-PSSessionConfiguration -name MaintenanceShell, AdminShell

Re-enable all session configurations on the computer.
The two commands are equivalent, so you can use either one:
PS C:\> Enable-PSSessionConfiguration -name *
PS C:\> Get-PSSessionConfiguration | Enable-PSSessionConfiguration

“Absence diminishes mediocre passions and increases great ones, as the wind blows out candles and fans fires” ~ La Rochefoucauld


Disable-PSSessionConfiguration - Deny access to PS session configuration
- Get the registered PS session configuration
Enable-PSRemoting - Allow the computer to receive remote commands

© Copyright SS64.com 1999-2016
Some rights reserved