Test-MDISensorApiConnection
Validates the connection to the Defender for Identity Sensor API.
Syntax
UseCurrentConfiguration (Default)
Test-MDISensorApiConnection
[<CommonParameters>]
BypassConfiguration
Test-MDISensorApiConnection
-SensorApiUrl <String>
-SensorType <Classic|Modern>
[-BypassConfiguration]
[-ProxyUrl <String>]
[-ProxyCredential <PSCredential>]
[<CommonParameters>]
Description
This function validates the connection to the Defender for Identity Sensor API using the current configuration or bypassing it with custom parameters.
Examples
EXAMPLE 1
Test-MDISensorApiConnection
This example tests the connection to the Defender for Identity Sensor API using the current configuration of the installed sensor.
EXAMPLE 2
$connectionParams = @{
BypassConfiguration = $true
SensorApiUrl = 'https://contososensorapi.atp.azure.com'
SensorType = 'Classic'
ProxyUrl = 'https://myproxy.contoso.com:8080'
ProxyCredential = $credential
}
Test-MDISensorApiConnection @connectionParams
This example tests the connection to the Defender for Identity Sensor API using custom parameters.
Parameters
-BypassConfiguration
Switch parameter to bypass the current configuration and use custom parameters.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
BypassConfiguration
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ProxyCredential
Specifies the credentials to use for the proxy server.
Parameter properties
| Type: | System.Management.Automation.PSCredential |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
BypassConfiguration
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ProxyUrl
Specifies the URL of the proxy server to use for the connection.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
BypassConfiguration
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SensorApiUrl
Specifies the URL of the Defender for Identity Sensor API to test.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
BypassConfiguration
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SensorType
Specifies the sensor version installed, or planned to install, on the device. Accepts one of the following values:
ClassicModern
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
BypassConfiguration
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
System.Boolean
The cmdlet returns $true when the connection to the Defender for Identity Sensor API is successful
or $false when it fails.