File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: In this article, you learn how to deploy and configure Azure Firewa
4
4
services : firewall
5
5
author : vhorne
6
6
ms.service : firewall
7
- ms.date : 08/ 02/2022
7
+ ms.date : 02/20/2024
8
8
ms.author : victorh
9
9
ms.topic : how-to
10
10
ms.custom : devx-track-azurepowershell
@@ -110,8 +110,10 @@ $wsn = Get-AzVirtualNetworkSubnetConfig -Name Workload-SN -VirtualNetwork $test
110
110
$NIC01 = New-AzNetworkInterface -Name Srv-Work -ResourceGroupName Test-FW-RG -Location "East us" -Subnet $wsn
111
111
112
112
#Define the virtual machine
113
+ $SecurePassword = ConvertTo-SecureString "<choose a password>" -AsPlainText -Force
114
+ $Credential = New-Object System.Management.Automation.PSCredential ("<choose a user name>", $SecurePassword);
113
115
$VirtualMachine = New-AzVMConfig -VMName Srv-Work -VMSize "Standard_DS2"
114
- $VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName Srv-Work -ProvisionVMAgent -EnableAutoUpdate
116
+ $VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName Srv-Work -ProvisionVMAgent -EnableAutoUpdate -Credential $Credential
115
117
$VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC01.Id
116
118
$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2019-Datacenter' -Version latest
117
119
You can’t perform that action at this time.
0 commit comments