Test-MDISensorApiConnection
Validates the connection to the Defender for Identity Sensor API.
Syntax
Test-MDISensorApiConnection []
Test-MDISensorApiConnection
[-BypassConfiguration]
-SensorApiUrl <String>
[-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'
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.
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | False |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProxyCredential
Specifies the credentials to use for the proxy server.
Type: | System.Management.Automation.PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProxyUrl
Specifies the URL of the proxy server to use for the connection.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SensorApiUrl
Specifies the URL of the Defender for Identity Sensor API to test.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
System.Boolean
The cmdlet returns $true
when the connection to the Defender for Identity Sensor API is successful
or $false
when it fails.