Microsoft Virtualization Discussions

Compare-Object problems


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


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




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                                                       =>

e0a                                                       <=

e4c                                                                             <=

e4d                                                                             <=

Register for Insight 2021 Digital

INSIGHT 2021 Digital: Meet the Specialists 2

On October 20-22, gear up for a fully digital, totally immersive virtual experience with a downright legendary lineup of world-renowned specialists. Tune in for visionary conversations, solution deep dives, technical sessions and more.

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