Set-MobileServerCertificate
SYNOPSIS
Sets the sslcert binding for Milestone XProtect Mobile Server
SYNTAX
Set-MobileServerCertificate [-X509Certificate <X509Certificate2>] [[-Thumbprint] <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Sets the sslcert binding for Milestone XProtect Mobile Server when provided with a certificate, an object with a Thumbprint property, or when the -Thumbprint parameter is explicitly provided.
The Thumbprint must represent a publicly signed and trusted certificate located in Cert:\LocalMachine\My where the private key is present.
EXAMPLES
EXAMPLE 1
gci Cert:\LocalMachine\My | ? Subject -eq 'CN=mobile.example.com' | Set-MobileServerCertificate
Gets a certificate for mobile.example.com from Cert:\LocalMachine\My and pipes it to Set-MobileServerCertificate
EXAMPLE 2
Submit-Renewal | Set-MobileServerCertificate
Submits an ACME certificate renewal using the Posh-ACME module, and if the certificate is renewed, updates the Mobile Server sslcert binding by piping the output to Set-MobileServerCertificate. The Submit-Renewal and New-PACertificate cmdlets return an object with a Thumbprint property.
If using Posh-ACME, you must ensure the New-PACertificate command is executed with elevated permissions, and used with the -Install switch so that the new certificate is installed into the Cert:\LocalMachine\My path. If you have done this, then subsequent executions of Submit-Renewal from an elevated session under the same user context will result the renewed certs being installed as well.
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Thumbprint
The certificate hash, commonly referred to as Thumbprint, representing a certificate which is present in the path Cert:\LocalMachine\My
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-X509Certificate
A [System.Security.Cryptography.X509Certificates.X509Certificate2] object representing a certificate which is present in the path Cert:\LocalMachine\My
Type: X509Certificate2
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.