Solved
Forum Discussion
- Cody_HostermanPuritaninput type is a VM object not the name
- Cody_HostermanPuritanso you need to pass in the return of get-vm
- Cody_HostermanPuritanyou could do -vm (get-vm -name myvm)
- jjprachylNovice Ithat worked . Ok for get-pfavvolstoragearray $fa it seems to be ignoring the credentials I provided and is working off of the session credentials
- Cody_HostermanPuritanif you are passing in a FA endpoint object it uses that to authenticate to the array to identify the correct VASA object in vSphere that represents that array (which is a VMware object) if you pass in an array name or serial it never reaches out to the FA REST at all, just vSphere API
- Cody_HostermanPuritanthe whole cmdlet:
- Cody_HostermanPuritan``` $pureArray = Get-VasaStorageArray |Where-Object {$_.VendorID -eq "PURE"} if (![string]::IsNullOrEmpty($arrayName)) { $pureArray = $pureArray |Where-Object {$_.Name -eq $arrayName} } elseif (![string]::IsNullOrEmpty($arraySerial)) { $pureArray = $pureArray | Where-Object {$_.Id -eq "com.purestorage:$($arraySerial)"} if ($ -eq $pureArray) { throw "Could not find a storage array for specified serial number: $($arraySerial). Make sure its VASA providers are registered on the correct vCenter." } } elseif ($ -ne $flasharray) { $arraySerial = (Get-PfaArrayAttributes -array $flasharray).id $pureArray = $pureArray | Where-Object {$_.Id -eq "com.purestorage:$($arraySerial)"} if ($ -eq $pureArray) { throw "Could not find a storage array for specified FlashArray with serial number: $($arraySerial). Make sure its VASA providers are registered on the correct vCenter." } }```
- jjprachylNovice IIs there a remove-snapshot for the vsphere module? or do i have to use purestoragepowershellsdk2? https://support.purestorage.com/Solutions/Microsoft_Platform_Guide/a_Windows_PowerShell/How-To%3A_Working_with_Snapshots_and_the_Powershell_SDK_v2#Destroying_(Removing)_and_Eradicating_Snapshots|https://support.purestorage.com/Solutions/Microsoft_Platform_Guide/a_Windows_PowerShell/[…]ow-To%3A_Working_with_Snapshots_and_the_Powershell_SDK_v2
- jjprachylNovice IIs this process also required? https://carvertown.com/my-flasharray-rest-api-2-x-authentication-journey/
- jjprachylNovice Inevemind, i think i answered my own questions