Create Install-Vra.ps1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
function Install-Vra {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[Parameter( Mandatory = $true )]
|
||||
[string]$hostName,
|
||||
[Parameter( Mandatory = $true )]
|
||||
[string]$datastoreName,
|
||||
[Parameter( Mandatory = $true )]
|
||||
[string]$networkName,
|
||||
[Parameter()]
|
||||
[int]$memoryInGB = 3,
|
||||
[Parameter()]
|
||||
[string]$groupName,
|
||||
[Parameter( ParameterSetName = "Dhcp", Mandatory = $true )]
|
||||
[switch]$Dhcp,
|
||||
[Parameter( ParameterSetName = "StaticIp", Mandatory = $true )]
|
||||
[ValidateScript( {$_ -match [IPAddress]$_ })]
|
||||
[string]$vraIpAddress,
|
||||
[Parameter( ParameterSetName = "StaticIp", Mandatory = $true )]
|
||||
[ValidateScript( {$_ -match [IPAddress]$_ })]
|
||||
[string]$defaultGateway,
|
||||
[Parameter( ParameterSetName = "StaticIp", Mandatory = $true )]
|
||||
[ValidateScript( {$_ -match [IPAddress]$_ })]
|
||||
[string]$subnetMask
|
||||
|
||||
)
|
||||
|
||||
$hostInformation = Get-
|
||||
}
|
||||
Reference in New Issue
Block a user