共用方式為


Windows LAPS PowerShell Cmdlet 概觀

Windows 本機系統管理員密碼解決方案 (Windows LAPS) 包含 LAPS PowerShell 模組。 瞭解其 Cmdlet、功能,以及它們與舊版Microsoft LAPS Cmdlet 的比較方式,以協助您安全地管理密碼。

Cmdlet 描述和使用方式

下表說明 LAPS PowerShell 模組中可用的 Cmdlet:

Name Description
Get-LapsAADPassword 查詢 Microsoft Entra ID 以取得 Windows LAPS 密碼。
Get-LapsDiagnostics 收集用於調查問題的診斷資訊。
Find-LapsADExtendedRights 找出哪些身份在 Windows Server Active Directory 的組織單位 (OU) 獲得了權限。
Get-LapsADPassword 查詢 Windows Server Active Directory 中的 Windows LAPS 密碼。
Invoke-LapsPolicyProcessing 啟動政策處理循環。
Reset-LapsPassword 立即進行密碼更換。 將密碼備份至 Microsoft Entra ID 或 Windows Server Active Directory 時使用。
Set-LapsADAuditing 在 Windows Server Active Directory 中的 OU 上設定 Windows LAPS 相關稽核。
Set-LapsADComputerSelfPermission 在 Windows Server Active Directory 中設定 OU,以允許計算機物件更新其 Windows LAPS 密碼。
Set-LapsADPasswordExpirationTime 在 Windows Server Active Directory 中更新電腦的 Windows LAPS 密碼到期時間。
Set-LapsADReadPasswordPermission 授與讀取 Windows Server Active Directory 中 Windows LAPS 密碼信息的許可權。
Set-LapsADResetPasswordPermission 授與更新 Windows Server Active Directory 中 Windows LAPS 密碼到期時間的許可權。
Update-LapsADSchema 使用 Windows LAPS 架構屬性擴充 Windows Server Active Directory 架構。

Tip

  • Invoke-LapsPolicyProcessingReset-LapsPassword Cmdlet 不受密碼目前備份至 Microsoft Entra ID 或 Windows Server Active Directory 的影響。 在此案例中,支援這兩個選項。

  • 當您使用 -Verbose 參數時,Windows LAPS PowerShell 模組中的所有 Cmdlet 都支援詳細的記錄。

如需每個 Cmdlet 的詳細資訊,請參閱 LAPS PowerShell 模組

比較 Windows LAPS 和舊版 Microsoft LAPS PowerShell

舊版Microsoft LAPS 包含名為 的 AdmPwd.PSPowerShell 模組。 這兩個模組有許多功能相似性,但它們也有許多差異。 下表提供兩個模組之間的對應:

Windows LAPS Cmdlet 舊版 Microsoft LAPS Cmdlet
Get-LapsAADPassword 不適用
Get-LapsDiagnostics 不適用
Find-LapsADExtendedRights Find-AdmPwdExtendedRights
Get-LapsADPassword Get-AdmPwdPassword
Invoke-LapsPolicyProcessing 不適用
Reset-LapsPassword 不適用
Set-LapsADAuditing Set-AdmPwdAuditing
Set-LapsADComputerSelfPermission Set-AdmPwdComputerSelfPermission
Set-LapsADPasswordExpirationTime Reset-AdmPwdPassword
Set-LapsADReadPasswordPermission Set-AdmPwdReadPasswordPermission
Set-LapsADResetPasswordPermission Set-AdmPwdResetPasswordPermission
Update-LapsADSchema Update-AdmPwdADSchema

除了命名相關變更之外,適用於 Windows Server Active Directory 的 Windows LAPS PowerShell Cmdlet 也會透過一組完全不同的架構延伸模組運作。 如需詳細資訊,請參閱 Windows LAPS 架構延伸模組參考

後續步驟