Hi,
I sit on a grpahical programm, that can reservate IP-Addresses in DHCP.
I have the following problem.
I will check, if the DHCP-Scope exist for the IP. I wrote this line:
$Scope_Check = Invoke-Command -ComputerName $Server -ScriptBlock {Get-DhcpServerv4Scope -ScopeId $Scope} -ErrorAction 'Stop'
This is the definiton for $Scope:
$Scope = "$IP1.$IP2.0.0"
When I use "Get-DhcpServerv4Scope" there is an unkown datatype for me, it's "<IPAddress[]>" for the "-ScopeId". When I use the string for "-ScopeId" there is an error: The string cannot convert to [System.Net.IPAddress]. Cann anyone tell my how I define the datatype "IPAddress[]" the variable $Scope?
Thanks,
Robert