New-DeviceDiscoveryConfiguration
New-DeviceDiscoveryConfiguration
Syntax
Parameter Set: FromMonitoringClass New-DeviceDiscoveryConfiguration [-MonitoringClass] <MonitoringClass> [-FromIPAddress] <IPAddress> [-ToIPAddress] <IPAddress> [ <CommonParameters>]
Detailed Description
Creates an object that represents settings to use to discover devices. The object can be used with Start-Discovery to discover devices.
Parameters
-FromIPAddress<IPAddress>
Specifies the first IP address, in an IP address range, of the devices to discover.
Aliases | none |
Required? | true |
Position? | 2 |
Default Value | none |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
-MonitoringClass<MonitoringClass>
Specifies the monitoring class to discover.
Aliases | none |
Required? | true |
Position? | 1 |
Default Value | none |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
-ToIPAddress<IPAddress>
Specifies the last IP address, in an IP address range, of the devices to discover.
Aliases | none |
Required? | true |
Position? | 3 |
Default Value | none |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Notes
-
For more information, type "Get-Help New-DeviceDiscoveryConfiguration -detailed". For technical information, type "Get-Help New-DeviceDiscoveryConfiguration -full".
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
Examples
-------------- EXAMPLE 1 --------------
This command first uses Get-MonitoringClass to create a monitoring class for network devices. It stores the monitoring class in the $networkdeviceclass variable. It then uses New-DeviceDiscoveryConfiguration to specify a device with the IP address range of 192.168.0.1 to 192.168.0.4 and with the monitoring class just created. Next, the ReadOnlyCommunity property is set to "CommunityString". The result, stored in the $dc variable, could be used with Start-Discovery to retrieve corresponding device information.
C:\PS>$networkdeviceclass = get-monitoringclass -name 'System.NetworkDevice'$dc = new-devicediscoveryconfiguration -monitoringclass `$networkdeviceclass -fromipaddress 192.168.0.1 -toipaddress 192.168.0.4$encoding = new-object System.Text.UnicodeEncoding$encodedCommunityString = $encoding.GetBytes("CommunityString")$dc.ReadOnlyCommunity = `[System.Convert]::ToBase64String($encodedCommunityString)
