-
Notifications
You must be signed in to change notification settings - Fork 1
/
AzurePSDeployer.ps1
38 lines (33 loc) · 1.34 KB
/
AzurePSDeployer.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<#
.INFO
Script Name: AzurePSDeployer.ps1
Description: Automatic Azure infrastructure deployer
.NOTES
File Name : AzurePSDeployer.ps1
Author : MarcoColomb0
Repository : https://github.com/MarcoColomb0/AzurePSDeployer
Prerequisite : PowerShell, Az module, and an Azure subscription :)
Description : A script that functions as a "launcher" for the deployments stored in the GitHub repository at /deployments
#>
# Display available services and prompt for user input
Write-Host "You are currently able to deploy these services"
Write-Host "1. Windows 11 - 23H2 (Client)"
Write-Host "2. Windows Server - 2022 Datacenter Edition"
$DeploymentPrompt = Read-Host "Enter the number corresponding to the service you want to deploy"
# Process user input and deploy the selected service
switch ($DeploymentPrompt) {
"1" {
$DeploymentType = "w11-23h2"
}
"2" {
$DeploymentType = "ws-2022"
}
default {
Write-Host "Invalid selection. Exiting script." -ForegroundColor Red
exit
}
}
# Build the script URL and deploy the selected service
$ScriptURL = "https://github.com/MarcoColomb0/AzurePSDeployer/raw/main/deployments/$DeploymentType.ps1"
Write-Host "Starting $DeploymentType deployment..." -ForegroundColor Green
Invoke-WebRequest -Uri $ScriptURL | Invoke-Expression