mirror of
https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator.git
synced 2026-02-05 16:19:08 +00:00
Delete Allfiles/Interactive Lab Simulation Files/08 directory
This commit is contained in:
parent
86ded7d191
commit
39ae882594
@ -1,23 +0,0 @@
|
|||||||
$rgName = 'az104-08-rg02'
|
|
||||||
$vmssName = 'az10408vmss0'
|
|
||||||
$vmss = Get-AzVmss `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-VMScaleSetName $vmssName
|
|
||||||
|
|
||||||
$publicSettings = @{
|
|
||||||
"fileUris" = (,"https://raw.githubusercontent.com/Azure-Samples/compute-automation-configurations/master/prepare_vm_disks.ps1");
|
|
||||||
"commandToExecute" = "powershell -ExecutionPolicy Unrestricted -File prepare_vm_disks.ps1"
|
|
||||||
}
|
|
||||||
|
|
||||||
Add-AzVmssExtension -VirtualMachineScaleSet $vmss `
|
|
||||||
-Name "customScript" `
|
|
||||||
-Publisher "Microsoft.Compute" `
|
|
||||||
-Type "CustomScriptExtension" `
|
|
||||||
-TypeHandlerVersion 1.8 `
|
|
||||||
-Setting $publicSettings
|
|
||||||
|
|
||||||
# Update the scale set and apply the Custom Script Extension to the VM instances
|
|
||||||
Update-AzVmss `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-Name $vmssName `
|
|
||||||
-VirtualMachineScaleSet $vmss
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
|
||||||
"name": "az104-08-vm1/customScriptExtension",
|
|
||||||
"apiVersion": "2018-06-01",
|
|
||||||
"location": "[resourceGroup().location]",
|
|
||||||
"dependsOn": [
|
|
||||||
"az104-08-vm1"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"publisher": "Microsoft.Compute",
|
|
||||||
"type": "CustomScriptExtension",
|
|
||||||
"typeHandlerVersion": "1.7",
|
|
||||||
"autoUpgradeMinorVersion": true,
|
|
||||||
"settings": {
|
|
||||||
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $($env:computername)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools
|
|
||||||
powershell.exe Remove-Item -Path 'C:\inetpub\wwwroot\iisstart.htm'
|
|
||||||
powershell.exe Add-Content -Path 'C:\inetpub\wwwroot\iisstart.htm' -Value "$env:computername"
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
New-StoragePool -FriendlyName storagepool1 -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
|
|
||||||
|
|
||||||
New-VirtualDisk -StoragePoolFriendlyName storagepool1 -FriendlyName virtualdisk1 -Size 2046GB -ResiliencySettingName Simple -ProvisioningType Fixed
|
|
||||||
|
|
||||||
Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName virtualdisk1)
|
|
||||||
|
|
||||||
New-Partition -DiskNumber 4 -UseMaximumSize -DriveLetter Z
|
|
||||||
Loading…
x
Reference in New Issue
Block a user