Azure PowerShell 버전을 찾으려면 어떻게 해야 합니까?
cmdlets 코드를 통해 설치된 Azure PowerShell 버전을 찾아야 합니다.Azure PowerShell 버전을 찾으려면 어떻게 해야 합니까?
참고: cmdlet 이외의 코드도 환영합니다.
이 PowerShell cmdlet은 Azure PowerShell 버전을 가져옵니다.
Get-Module -ListAvailable -Name Azure -Refresh
Azure 모듈이 현재 PowerShell 세션에 로드되지 않았더라도 기대한 결과를 반환할 수 있다는 큰 장점이 있습니다.
반대로,(Get-Module Azure).VersionAzure 모듈이 이전에 현재 PowerShell 세션에 로드된 적이 있는 경우, 즉 현재 PowerShell 세션의 Azure 모듈에서 cmdlet을 호출하는 경우에만 작동합니다.Get-AzureStorageAccount
사용:
(Get-Module azure).Version
설치된 Azure PowerShell 버전이 반환됩니다.
Get-InstalledModule -Name Az -AllVersions | select Name,Version
https://learn.microsoft.com/en-us/powershell/azure/install-az-ps 에 문서화되어 있습니다.
다음 cmdlet을 사용하여 Azure PowerShell 버전도 가져올 수 있습니다!
다음을 복사하여 붙여넣고 실행합니다!
(Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' }) ` | Select Version, Name, Author, PowerShellVersion | Format-List;
Get-Module AzureRM -List | Select-Object Name, Version, Path
여러 버전이 실행 중인 경우 실행하기 좋습니다.
공식 사용:
$PSVersionTable.PS 버전
버전 0.8 및 0.9에서는 ARM 모드가 아닌 Azure Service Management 모드로 실행됩니다.버전 1.0 이상에서는 원활하게 작동합니다.
$name='Azure'
if(Get-Module -ListAvailable | Where-Object { $_.name -eq $name })
{
(Get-Module -ListAvailable | Where-Object{ $_.Name -eq $name }) | Select Version, Name, Author, PowerShellVersion | Format-List;
}
else
{
“The Azure PowerShell module is not installed.”
}
건배!
PowerShell에서 다음 명령을 실행하면 현재 Azure PowerShell 버전이 표시됩니다.
Get-Module -ListAvailable -Name Az
언급URL : https://stackoverflow.com/questions/34157067/how-do-i-find-the-azure-powershell-version
'programing' 카테고리의 다른 글
| .NET 그래프 라이브러리 주변에 있습니까? (0) | 2023.05.08 |
|---|---|
| Bash에서 함수 인수로 공백이 있는 문자열 전달 (0) | 2023.05.08 |
| PowerShell에서 콘텐츠가 있는 디렉터리를 조용히 제거하는 방법 (0) | 2023.05.08 |
| 일부 셀에 하이퍼링크 추가openpyxl (0) | 2023.05.08 |
| Visual Basic의 배열 크기? (0) | 2023.05.08 |


