21 lines
628 B
PowerShell
21 lines
628 B
PowerShell
<#Param(
|
|
[string]
|
|
$SCTaskNum = "World"
|
|
)
|
|
|
|
Write-Host "Hello, $WorldName!"#>
|
|
|
|
|
|
Connect-ITDvCenter -Credential $Secret:ndgov_svcitdiaasauto -Verbose
|
|
$NewVMParams = @{
|
|
Name = "itdzmtest"+(100..999 | Get-Random) + ".nd.gov"
|
|
ResourcePool = "WINDOWS1"
|
|
Datastore = "WINDOWS1_FS92_Gen";
|
|
DiskStorageFormat = "Thin";
|
|
Template = "Windows Server 2022 Standard 2108.21";
|
|
Location = Get-Cluster "WINDOWS1" | Get-Datacenter | Get-Folder -Name "_New Builds"
|
|
}
|
|
|
|
New-VM @NewVMParams
|
|
Disconnect-ITDvCenter
|
|
|