Microsoft Virtualization Discussions

Compare-Object problems

sjallabais

Compare-Object does not seem to work on all Toolkit objects.

Examples:

Compare-Object (Get-NaNetPersistentConfig) (Get-NaNetActiveConfig)

Compare-Object (Get-NaLicense -controller $netapp1a) (Get-NaLicense -controller $netapp1b)

Both returns nothing when there are obvious differences.

Compare-Object (Get-NaOption -controller $netapp1a) (Get-NaOption -controller $netapp1b)

Works like it should.

I'm running Toolkit 1.4 and OnTAP 8.0.2RC1

/Sjalla

1 REPLY 1

timothyn

Hi Sjalla,

You can provide more information to Compare-Object so it will understand what you want to compare.

For licenses you can specify the Service & Licensed properties:

PS C:\> Compare-Object (Get-NaLicense -contr $mcb) (Get-NaLicense -contr $mca) -Property Service, Licensed

Service                                                                Licensed SideIndicator

-------                                                                -------- -------------

disk_sanitization                                                          True =>

flex_clone                                                                False =>

disk_sanitization                                                         False <=

flex_clone                                                                 True <=

And for the network config, you'll need to drill down a bit more into the object:

PS C:\> $net1 = Get-NaNetActiveConfig -Controller $mca

PS C:\> $net2 = Get-NaNetActiveConfig -Controller $mcb

PS C:\> Compare-Object $net1.Interfaces $net2.Interfaces -Property Interface,PrimaryAddresses

Interface                               PrimaryAddresses                        SideIndicator

---------                               ----------------                        -------------

e0a                                     10.61.132.11                            =>

e0a                                     10.61.132.10                            <=

e4c                                                                             <=

e4d                                                                             <=

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public