Book Image

Learning PowerShell DSC

By : James Pogran
Book Image

Learning PowerShell DSC

By: James Pogran

Overview of this book

Table of Contents (14 chapters)
Learning PowerShell DSC
About the Author
About the Reviewers

Remotely pushing DSC configurations

Once you have mastered pushing DSC configuration files locally, you will find that there isn't a lot of difference in pushing them remotely. It's pretty much the same steps but with the addition of creating a remote session on the target host before pushing. We can either create remote sessions called CimSessions ourselves or allow Start-DscConfiguration to create them for us in order to pass information and commands to the remote host.

We would create CimSessions ourselves if we wanted to reuse the sessions for multiple attempts, as this would save us time connecting, closing, and reconnecting each time we attempted to push DSC configurations. We also would create CimSessions if we had a nonstandard WinRM setup, for example HTTPS endpoints or different authentication methods (Kerberos or basic authentication, and so on).

You will definitely create your own CimSessions in a non-domain or workgroup environment, as the account you are using to issue the Start...