Check deprecated PowerCLI CMDlets

Check deprecated PowerCLI CMDlets

I think most of you have a set of various PowerCLI Scripts that runs automatically day by day. Have you ever checked if your older scripts contain some deprecated commands? Here is a handy way to check …

If you read the Change Log from PowerCLI here you find some deprecated or even deleted commands. So that is the reason why you should check from time to time your daily running scripts.

At the last VMworld 2018 in Barcelona, I spoke to Kyle Ruddy after the Session “DEV3504BE” about a way to check on deprecated commands. I hope to get a list from him soon but in the meantime I looked at a easy way to check the content of a Script folder against a JSON-File. And this was much easier than I thought šŸ˜‰

All we need is a JSON File filled and a few lines of PowerShell.

The JSON File could look like this:

To check your usage of deprecated or deleted commands you could use this:

The output tells you in which file and line you used one of those commands.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.