Quick modification of the Compare-Command.ps1 script


I found a few issues with my Compare-Command script, and have resolved them.

If you have already downloaded it from TechNet, thanks, and you can just modify the following two lines:

Line 72 becomes:
$V3Detailed |select -ExpandProperty Parameters |ForEach-Object -Process {$V3Paramaters += ($($_.Name)=$($_.ParameterType.name)=$($V3ModuleName[0]))}

Line 82, likewise, becomes:
$V2Detailed |select -ExpandProperty Parameters |ForEach-Object -Process {$V2Paramaters += ($($_.Name)=$($_.ParameterType.Split(“.”)[-1])=$($V2ModuleName[0]))”)}

While I am at it, I am wondering if people like having the script(s) available to download from TechNet, or if it’s more convient for me to paste them into my posts?

Leave a comment and I will decide how to handle future scripts.

Advertisements

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: