GuilhermeAlves's Accepted Solutions

You can try this: # Adding PowerCLI Snapin if(!(get-pssnapin | where {$_.name -eq "vmware.vimautomation.core"})) {         try {             add-pssnapin VMware.VimAutomation.Core| out... See more...
You can try this: # Adding PowerCLI Snapin if(!(get-pssnapin | where {$_.name -eq "vmware.vimautomation.core"})) {         try {             add-pssnapin VMware.VimAutomation.Core| out-null         } catch {             throw "Could not load PowerCLI snapin"         } } $VIServer = "vcenter1","vcenter2" $Report = @() foreach($VCserver in $VIserver){     $currentVC = Connect-VIServer -Server $VCserver -Protocol https -User administrator -Password Pass@123     $Header = @"             <style>                 TABLE {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}                 TH {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #6495ED;}                 TD {border-width: 1px;padding: 3px;border-style: solid;border-color: black;}                 .odd  { background-color:#ffffff; }                 .even { background-color:#dddddd; }             </style>             <title>Snapshot Report - $VcServer</title> "@ $a = Get-VM -Server $currentVC | Get-Snapshot | Select VM,@{N="VCname";E={$currentVC.Name}},Name,Description,Created,SizeMB,SizeGB     If (-not $a){         $a = New-Object PSObject -Property @{         VCname = "No snapshots found on any VM's controlled by $($currentVC.Name)"         VM = ""         Name = ""         Description = ""         SizeGB = ""         Created = ""         }     } Disconnect-VIServer $currentVC -Force -Confirm:$false $Report += $a } $Report = $report | Select VCname,VM,Name,Description,SizeGB,Created | ConvertTo-Html -Head $Header -PreContent "<p><h2>Snapshot Report</h2></p><br>" $Report | Out-File "C:\VM-operations\dailyreport\SnapShotReport.html"
If you want only the MultipathPolicy, you can remove the rest of atributes. Note: This script take a large amount of time to run if you have many datastores. Here it is: $VMhosts = Get... See more...
If you want only the MultipathPolicy, you can remove the rest of atributes. Note: This script take a large amount of time to run if you have many datastores. Here it is: $VMhosts = Get-datacenter xxxxxxxxxx | Get-VMHost $output=@() foreach($vmhost in $VMhosts){   $datastores = $vmhost | Get-Datastore   $paths =@()   foreach($dt in $datastores){   $extentDatastore = $dt.ExtensionData.Info.Vmfs.Extent   $extentDatastore| %{                     $path = $vmhost |Get-ScsiLun -CanonicalName $_.DiskName                 $ConsoleDeviceName = $path.ConsoleDeviceName         $LunType = $path.LunType         $CapacityGB = $path.CapacityGB         $MultipathPolicy = $path.MultipathPolicy         $RuntimeName = $path.RuntimeName         $Model = $path.Model         $Vendor = $path.Vendor         $tempOutput = ""| select VMHost,DatastoreName,CanonicalNames,ConsoleDeviceName,LunType,CapacityGB,MultipathPolicy,RuntimeName,Model,Vendor         $tempOutput.VMHost = $vmhost.Name         $tempOutput.DatastoreName = $dt.Name         $tempOutput.CanonicalNames = $_.DiskName         $tempOutput.ConsoleDeviceName = $ConsoleDeviceName         $tempOutput.LunType = $LunType         $tempOutput.CapacityGB = $CapacityGB         $tempOutput.MultipathPolicy = $MultipathPolicy         $tempOutput.RuntimeName = $RuntimeName         $tempOutput.Model = $Model         $tempOutput.Vendor = $Vendor         $output+= $tempOutput           }} } $output| Export-Csv "c:\ctpaths.csv" -NoTypeInformation -UseCulture