Script to copy Client Settings between sites

Copy Site Settings between sites

This post is for a coworker of mine, Daniel. He’s a smart cookie I work with and has a great blog, PotentEngineer. Here ya go my friend!


I’ve been working on a PowerShell module for our environment that does a variety of things and I’ve been wanting to post it here on my blog. This request has kick started me on getting this done. I’ll be posting each function here and building the resulting module as I go, so to get started we need to take care of a couple of required functions in the module that are used in almost all the other functions.

Function New-CMNLogEntry

First, is a quick update to my earlier post for creating log entries. I’ve added some logic to check for maintaining the log size and rolling the logs. Since this is based of an earlier post, I’ll just mention what I’ve added.

  1. In order to keep my module commands unique, I’ve added ‘CMN’ to the beginning of the Noun part of the functions.
  2. I’ve added a maxLogSize parameter, that defaults to 5MB. This will roll the log over if the log exceeds this size.

Here’s the New-CMNLogEntry Function:

Function Get-CMNSCCMConnectionInfo

Next, a majority of my functions need a PSObject that contains information for connecting to the SCCM Site Server and SQL Server, this function will return exactly what you need, you just need to provide the site servers name.

Function Copy-CMNClientSettings

Now, it’s time for the actual script to copy the client settings!


I’ll be continuing this series, adding more functions as I go. I’ll also be putting this in my bitBucket files, please let me know if you have any suggestions! Thank you!

2 thoughts on “Script to copy Client Settings between sites”

Comments are closed.

%d bloggers like this: