< Back

Set-MobileServerCertificate

Sat Jan 18, 2020 8:02 pm

NAME 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.





PARAMETERS

-X509Certificate <X509Certificate2>

A [System.Security.Cryptography.X509Certificates.X509Certificate2] object representing a certificate

which is present in the path Cert:\\LocalMachine\\My



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Thumbprint <String>

The certificate hash, commonly referred to as Thumbprint, representing a certificate which is present

in the path Cert:\\LocalMachine\\My



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>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 --------------------------



PS C:\\>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.











RELATED LINKS