I run all my scripts in PS5 using Get-VICredentialStoreItem to get the user credentials to log into the relevant vCenter however I am now porting my scripts over to PS7 and the first problem I've hit is this message:
PS C:\Users\Me> Get-VICredentialStoreItem
Get-VICredentialStoreItem: Cmdlet Get-VICredentialStoreItem is not supported on PowerShell Core.
So does this mean I cannot use any stored credentials anymore in PS7? What's the new way to do this now?
PowerCLI version:
Method 1:
PS C:\Users\Me> Get-PowerCLIVersion
WARNING: The cmdlet "Get-PowerCLIVersion" is deprecated. Please use the 'Get-Module' cmdlet instead.
PowerCLI Version
----------------
VMware.PowerCLI 13.1.0 build 21624340
---------------
Component Versions
---------------
VMware Common PowerCLI Component 13.1 build 21605386
VMware Cis Core PowerCLI Component PowerCLI Component 13.1 build 21605976
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.1 build 21606170
Method 2:
PS C:\Users\Me> Get-Module -Name VMware.* | Select-Object -Property Name,Version
Name Version
---- -------
VMware.Vim 8.1.0.21605554
VMware.VimAutomation.Cis.Core 13.1.0.21605976
VMware.VimAutomation.Common 13.1.0.21605386
VMware.VimAutomation.Core 13.1.0.21606170
VMware.VimAutomation.Sdk 13.1.0.21605170
Powershell version:
PS C:\Users\Me> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0