Test-MDISensorApiConnection

驗證與 Defender for Identity Sensor API 的連線。

語法

UseCurrentConfiguration (預設值)

Test-MDISensorApiConnection
    [<CommonParameters>]

BypassConfiguration

Test-MDISensorApiConnection
    -SensorApiUrl <String>
    -SensorType <Classic|Modern>
    [-BypassConfiguration]
    [-ProxyUrl <String>]
    [-ProxyCredential <PSCredential>]
    [<CommonParameters>]

Description

此函式會驗證與 Defender for Identity Sensor API 的連線,使用目前設定或以自訂參數繞過。

範例

範例 1

Test-MDISensorApiConnection

此範例測試使用目前安裝感測器的配置,測試與 Defender for Identity Sensor API 的連線。

範例 2

$connectionParams = @{
    BypassConfiguration = $true
    SensorApiUrl        = 'https://contososensorapi.atp.azure.com'
    SensorType          = 'Classic'
    ProxyUrl            = 'https://myproxy.contoso.com:8080'
    ProxyCredential     = $credential
}
Test-MDISensorApiConnection @connectionParams

此範例使用自訂參數測試與 Defender for Identity Sensor API 的連線。

參數

-BypassConfiguration

切換參數以繞過目前的設定,改用自訂參數。

參數屬性

類型:System.Management.Automation.SwitchParameter
預設值:False
支援萬用字元:False
不要顯示:False

參數集

BypassConfiguration
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ProxyCredential

指定代理伺服器要使用的憑證。

參數屬性

類型:System.Management.Automation.PSCredential
預設值:None
支援萬用字元:False
不要顯示:False

參數集

BypassConfiguration
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ProxyUrl

指定用於連線的代理伺服器 URL。

參數屬性

類型:System.String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

BypassConfiguration
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SensorApiUrl

指定測試 Defender for Identity Sensor API 的網址。

參數屬性

類型:System.String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

BypassConfiguration
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SensorType

指定裝置安裝或計劃安裝的感測器版本。 接受以下其中一個值:

  • Classic
  • Modern

參數屬性

類型:System.String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

BypassConfiguration
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。

輸出

System.Boolean

當與 Defender for Identity Sensor API 的連線成功或$false失敗時,指令長會回傳$true。