여러 Elastic SAN 볼륨을 일괄 처리로 만들기
여러 볼륨을 일괄 처리로 간단하게 만들려면 미리 채워진 값이 있는 .csv를 사용하여 원하는 만큼 다양한 크기의 볼륨을 만들 수 있습니다.
5개의 열 ResourceGroupName, ElasticSanName, VolumeGroupName, Name 및 SizeGiB를 사용하여 .csv 서식을 지정합니다. 다음 스크린샷은 예를 제공합니다.
그런 후 다음 스크립트를 사용하여 볼륨을 만들 수 있습니다.
$filePath = "D:\ElasticSan\TestCsv3.csv"
$BatchCreationList = Import-Csv -Path $filePath
foreach($creationParam in $BatchCreationList) {
# -AsJob can be added to make the operations parallel
# -ErrorAction can be added to change the behavior of the for loop when an error occurs
New-AzElasticSanVolume -ElasticSanName $creationParam.ElasticSanName -GroupName $creationParam.VolumeGroupName -Name $creationParam.Name -ResourceGroupName $creationParam.ResourceGroupName -SizeGiB $creationParam.SizeGiB #-ErrorAction Continue #-AsJob
}
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기