en-US/about_WSManListener.help.txt

.NAME
    WSManListener
 
.SYNOPSIS
    The WSManListener DSC resource is used to create, modify, or remove
    WSMan listeners.
 
.DESCRIPTION
    This resource is used to create, edit or remove WS-Management HTTP/HTTPS listeners.
 
    ### SubjectFormat Parameter Notes
 
    The subject format is used to determine how the certificate for the listener
    will be identified. It must be one of the following:
 
    - Both: Look for a certificate with a subject matching the computer FQDN.
        If one can't be found the flat computer name will be used. If neither
        can be found then the listener will not be created.
    - FQDN: Look for a certificate with a subject matching the computer FQDN
        only. If one can't be found then the listener will not be created.
    - ComputerName: Look for a certificate with a subject matching the computer
    FQDN only. If one can't be found then the listener will not be created.
 
.PARAMETER Transport
    Key - WSManTransport
    The transport type of WS-Man Listener.
 
.PARAMETER Ensure
    Required - Ensure
    Specifies whether the WS-Man Listener should exist.
 
.PARAMETER Port
    Write - Nullable[System.UInt16]
    The port the WS-Man Listener should use. Defaults to 5985 for HTTP and 5986 for HTTPS listeners.
 
.PARAMETER Address
    Write - System.String
    The Address that the WS-Man Listener will be bound to. The default is * (any address).
 
.PARAMETER Issuer
    Write - System.String
    The Issuer of the certificate to use for the HTTPS WS-Man Listener if a thumbprint is
    not specified.
 
.PARAMETER SubjectFormat
    Write - WSManSubjectFormat
    The format used to match the certificate subject to use for an HTTPS WS-Man Listener
    if a thumbprint is not specified.
 
.PARAMETER MatchAlternate
    Write - Nullable[System.Boolean]
    Should the FQDN/Name be used to also match the certificate alternate subject for an HTTPS WS-Man
    Listener if a thumbprint is not specified.
 
.PARAMETER BaseDN
    Write - System.String
    This is the BaseDN (path part of the full Distinguished Name) used to identify the certificate
    to use for the HTTPS WS-Man Listener if a thumbprint is not specified.
 
.PARAMETER CertificateThumbprint
    Write - System.String
    The Thumbprint of the certificate to use for the HTTPS WS-Man Listener.
 
.PARAMETER HostName
    Write - System.String
    The HostName of WS-Man Listener.
 
.PARAMETER Enabled
    Read - System.Boolean
    Returns true if the existing WS-Man Listener is enabled.
 
.PARAMETER URLPrefix
    Read - System.String
    The URL Prefix of the existing WS-Man Listener.
 
.PARAMETER Reasons
    Read - WSManReason[]
    Returns the reason a property is not in desired state.
 
.EXAMPLE 1
 
This will create or enable an HTTP WS-Man Listener on port 5985.
configuration Sample_WSManListener_HTTP
 
Configuration WSManListener_HTTP_Config
{
    Import-DscResource -Module WSManDsc
 
    Node localhost
    {
        WSManListener HTTP
        {
            Transport = 'HTTP'
            Ensure = 'Present'
        } # End of WSManListener Resource
    } # End of Node
} # End of Configuration
 
.EXAMPLE 2
 
Create an HTTPS Listener using a LocalMachine certificate that
is installed and issued by 'CN=CONTOSO.COM Issuing CA, DC=CONTOSO, DC=COM'
on port 5986.
 
Configuration WSManListener_HTTPS_Config
{
    Import-DscResource -Module WSManDsc
 
    Node localhost
    {
        WSManListener HTTPS
        {
            Transport = 'HTTPS'
            Ensure = 'Present'
            Issuer = 'CN=CONTOSO.COM Issuing CA, DC=CONTOSO, DC=COM'
        } # End of WSManListener Resource
    } # End of Node
} # End of Configuration
 
.EXAMPLE 3
 
Create an HTTPS Listener using a LocalMachine certificate containing a BaseDN matching
'O=Contoso Inc, S=Pennsylvania, C=US' that is installed and issued by
'CN=CONTOSO.COM Issuing CA, DC=CONTOSO, DC=COM' on port 5986.
 
Configuration WSManListener_HTTPS_WithBaseDN_Config
{
    Import-DscResource -Module WSManDsc
 
    Node localhost
    {
        WSManListener HTTPS
        {
            Transport = 'HTTPS'
            Ensure = 'Present'
            Issuer = 'CN=CONTOSO.COM Issuing CA, DC=CONTOSO, DC=COM'
            BaseDN = 'O=Contoso Inc, S=Pennsylvania, C=US'
        } # End of WSManListener Resource
    } # End of Node
} # End of Configuration
 
.EXAMPLE 4
 
Create an HTTPS Listener using a LocalMachine certificate with a thumbprint
matching 'F2BE91E92AF040EF116E1CDC91D75C22F47D7BD6'. The host name in the
certificate must match the name of the host machine.
 
Configuration WSManListener_HTTPS_WithThumbprint_Config
{
    Import-DscResource -Module WSManDsc
 
    Node localhost
    {
        WSManListener HTTPS
        {
            Transport = 'HTTPS'
            Ensure = 'Present'
            CertificateThumbprint = 'F2BE91E92AF040EF116E1CDC91D75C22F47D7BD6'
        } # End of WSManListener Resource
    } # End of Node
} # End of Configuration
 
.EXAMPLE 5
 
Create an HTTPS Listener using a LocalMachine certificate with a thumbprint
matching 'F2BE91E92AF040EF116E1CDC91D75C22F47D7BD6'. If the subject in the
certificate does not match the name of the host then the Hostname parameter
must be specified. In this example the subject in the certificate is
'WsManListenerCert'.
 
Configuration WSManListener_HTTPS_WithThumbprintAndHostname_Config
{
    Import-DscResource -Module WSManDsc
 
    Node localhost
    {
        WSManListener HTTPS
        {
            Transport = 'HTTPS'
            Ensure = 'Present'
            CertificateThumbprint = 'F2BE91E92AF040EF116E1CDC91D75C22F47D7BD6'
            Hostname = 'WsManListenerCert'
        } # End of WSManListener Resource
    } # End of Node
} # End of Configuration