In step 1, you create a self-signed certificate with a subject name of SRV1. The New-SelfSignedCertificate creates this certificate in the local machine's MY folder. There is no output from this step, but the certificate is stored in the $DscCert variable for use in the next step. This recipe uses this certificate to provide SSL access to the DSC web service.
In step 2, you copy the certificate to the root store on SRV2. Unfortunately, the certificate provider in PowerShell does not support copying a certificate from one store to another, so you need to dip down into the .NET framework to add the self-signed certificate held in $DscCert to the SRV2 server's local machine trusted root store. This has the effect of enabling ...