So I’ve been working in some strange Configuration Manager environments lately, sometimes they are not always up to date, yea… yea… I know. But they are test environments, so you know.
One of the problems I have is that when I call some CM PowerShell CmdLets, I get a warning:
WARNING: an update to the System Center 2012 Configuration Manager Cmdlet Library is available. Please go to 'http://go.microsoft.com/fwlink/?LinkId=<something>' to download the latest version. Running cmdlet version: <someversion> Latest cmdlet version: <someversion>.
Well the output has been driving me nuts, and I finally decided to dig into the problems and find out how to suppress the message.
Niall Brady has a blog post on the subject:
But his recommended fix is to install the latest cmdlet library, well, I suppose I could do that, but I was wondering if there was an easier. way.
I decided to do some reverse Engineering.
- What dll files to the CM PowerShell cmdlets live?
get-command get-cmsite | format-list *
Unfortunately, did not reveal too much.
- Did a Grep of the dll’s to find the error message, same files.
- Finally able to track down the function: get-CMCmdletUpdateCheck and a match to the error string
- Skip the Update? Yes I want to skip the update, that looks like it’s what I want.
Well it turns out this was a round about way to the Get-CMCmdletUpdateCheck Cmdlet which does what I was looking for.
Simply run Set-CMCmdletUpdateCheck with -IsUpdateCheckEnabled $False to suppress the output:
Set-CMCmdletUpdateCheck -CurrentUser -IsUpdateCheckEnabled $False
Nice and quiet :^)