-
Notifications
You must be signed in to change notification settings - Fork 9
Assert IPAddress
Asserts if the IP Address is valid and optionally validates the IP Address against an Address Family.
Assert-IPAddress [[-AddressFamily] <String>] [-Address] <String>
[<CommonParameters>]
Checks the IP address so that it is valid and do not conflict with address family. If any problems are detected an exception will be thrown.
Assert-IPAddress -Address '127.0.0.1'
This will assert that the supplied address is a valid IPv4 address. If it is not an exception will be thrown.
Assert-IPAddress -Address 'fe80:ab04:30F5:002b::1'
This will assert that the supplied address is a valid IPv6 address. If it is not an exception will be thrown.
Assert-IPAddress -Address 'fe80:ab04:30F5:002b::1' -AddressFamily 'IPv6'
This will assert that address is valid and that it matches the supplied address family. If the supplied address family does not match the address an exception will be thrown.
Specifies an IPv4 or IPv6 address.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
IP address family that the supplied Address should be in. Valid values are 'IPv4' or 'IPv6'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Get-ComputerName
- Get-DscProperty
- Get-EnvironmentVariable
- Get-LocalizedData
- Get-LocalizedDataForInvariantCulture
- Get-PSModulePath
- Get-TemporaryFolder
- Get-UserName
- New-ArgumentException
- New-ErrorRecord
- New-Exception
- New-InvalidDataException
- New-InvalidOperationException
- New-InvalidResultException
- New-NotImplementedException
- New-ObjectNotFoundException
- Remove-CommonParameter
- Set-DscMachineRebootRequired
- Set-PSModulePath
- Test-AccountRequirePassword
- Test-DscParameterState
- Test-DscProperty
- Test-IsNanoServer
- Test-IsNumericType
- Test-ModuleExist