Skip to content

Commit 7d8b2aa

Browse files
WIP
1 parent 6f1618b commit 7d8b2aa

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

scripts/AzurePlatformSetup/SmallEnvironment/Create-SmallEnvironment.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ $newDataDisk = New-AzDisk -ResourceGroupName $resourceGroupName -DiskName $dataD
111111
Add-AzVMDataDisk -VM $vm -Name $dataDiskName -CreateOption Attach -ManagedDiskId $newDataDisk.Id -Lun 1
112112
Update-AzVM -VM $vm -ResourceGroupName $vm.ResourceGroupName
113113
Invoke-AzVMRunCommand -VM $vm -CommandId 'RunPowerShellScript' -ScriptString "Get-disk | where-Object Number -eq '1' | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -DriveLetter E | Format-Volume -FileSystem NTFX -NewFileSystemLabel 'QuantumDMS-Data'"
114+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[CmdletBinding()]
3+
param (
4+
[Parameter(Mandatory = $true)]
5+
[string]$ScriptDownloadFolder,
6+
7+
[Parameter(Mandatory = $true)]
8+
[string]$PowerShellCoreVersion
9+
)
10+
11+
$powerShellMsiFilename = "PowerShell-$PowerShellCoreVersion-win-x64.msi"
12+
$powerShellDownloadURL = "https://github.com/PowerShell/PowerShell/releases/download/v$PowerShellCoreVersion/$powerShellMsiFilename"
13+
$powerShellOutFile = "$ScriptDownloadFolder\$powerShellMsiFilename"
14+
15+
Write-Host "Downloading $powerShellDownloadURL"
16+
Invoke-WebRequest -Uri $powerShellDownloadURL -Method Get -OutFile $powerShellOutFile
17+
Write-Host "Downloading PowerShell Core completed."
18+
19+
Write-Host "Installing PowerShell Core $PowerShellCoreVersion"
20+
msiexec.exe /l*v powershellinstall.log /quiet /i $powerShellOutFile ENABLE_MU=0 USE_MU=0 ADD_PATH=1
21+
Write-Host "Installing PowerShell Core $PowerShellCoreVersion completed."

0 commit comments

Comments
 (0)