93 lines
2.0 KiB
PowerShell
93 lines
2.0 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
A short one-line action-based description, e.g. 'Tests if a function is valid'
|
|
.DESCRIPTION
|
|
A longer description of the function, its purpose, common use cases, etc.
|
|
.NOTES
|
|
Information or caveats about the function e.g. 'This function is not supported in Linux'
|
|
.LINK
|
|
Specify a URI to a help page, this will show when Get-Help -Online is used.
|
|
.EXAMPLE
|
|
Test-MyTestFunction -Verbose
|
|
Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines
|
|
#>
|
|
|
|
function New-ITDWindowsVM {
|
|
[CmdletBinding()]
|
|
param (
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateSet('VMware', 'Azure')]
|
|
[string]
|
|
$Platform,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$ComputerName,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[int]
|
|
$CPU,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[int]
|
|
$MemoryGB,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[int]
|
|
$DiskOS,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[int]
|
|
$DiskSwap,
|
|
|
|
[int]
|
|
$DiskData = 0,
|
|
|
|
[Parameter(Mandatory = $true)] # this will decide Azure subscription
|
|
[string]
|
|
$Subnet,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$OS,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$Environment,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$Datacenter,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$AppName,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]
|
|
$LicensingRestrictions,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[PSCredential]
|
|
$Credential
|
|
)
|
|
|
|
begin {
|
|
|
|
}
|
|
|
|
process {
|
|
switch ($Platform) {
|
|
'VMware' {
|
|
# New-ITDWindowsVmVmware
|
|
}
|
|
'Azure' {
|
|
# New-ITDWindowsVmAzure
|
|
}
|
|
}
|
|
}
|
|
|
|
end {
|
|
|
|
}
|
|
} |