PowerShell ile Azure'da RHEL VM olusturma

Опубликовано: 26 Январь 2025
на канале: Emre Ozan Memis
304
18

$resourceGroup = "AzureRG"
$location = "westus"
$vmName = "PS-rhel2-vm"
$cred = Get-Credential -Message "Enter a username and password for the virtual machine."
New-AzResourceGroup -Name $resourceGroup -Location $location
New-AzVM -ResourceGroupName $resourceGroup -Name $vmName -Location $location -ImageName "RHEL" -Size "Standard_D2_v3" -VirtualNetworkName "PSAzureBCVnet" -SubnetName "PSDMZSubnet" -Credential $cred -OpenPorts 22