New-AzureADApplicationPasswordCredential

建立應用程式的密碼認證。

語法

New-AzureADApplicationPasswordCredential
   -ObjectId <String>
   [-CustomKeyIdentifier <String>]
   [-StartDate <DateTime>]
   [-EndDate <DateTime>]
   [-Value <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

New-AzureADApplicationPasswordCredential Cmdlet 會為 Azure Active Directory (AD) 中的應用程式建立密碼認證。

範例

範例 1:建立密碼認證

PS C:\>New-AzureADApplicationPasswordCredential -ObjectId "3ddd22e7-a150-4bb3-b100-e410dea1cb84"

CustomKeyIdentifier :
EndDate             : 9/28/2017 3:57:10 PM
KeyId               :
StartDate           : 9/28/2016 3:57:10 PM
Value               : ZJ0V1Yg4cp4eWIey9DrYspqVdX1pdvY437P/ueGxVLU=

範例 2:建立自訂密碼認證

PS C:\>New-AzureADApplicationPasswordCredential -ObjectId '6e6a6561-e96d-453b-9641-743b499736cc' -Value 'Zihjfg-dsgs_d34_54"73fE"d!f~dg'
 
CustomKeyIdentifier :
EndDate             : 16-12-2023 06:00:44
KeyId               :
StartDate           : 16-12-2022 06:00:44
Value               : Zihjfg-dsgs_d34_54"73fE"d!f~dg

參數

-CustomKeyIdentifier

唯一的二進位標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-EndDate

密碼過期的日期和時間。

類型:DateTime
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-InformationAction

指定此 Cmdlet 如何回應資訊事件。 此參數可接受的值為:

  • 繼續
  • 忽略
  • 詢問
  • SilentlyContinue
  • Stop
  • 暫止
類型:ActionPreference
別名:infa
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InformationVariable

指定資訊變數。

類型:String
別名:iv
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ObjectId

指定 Azure AD 中使用者的識別碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-StartDate

密碼生效的日期和時間。

類型:DateTime
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-Value

使用者的密碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False