New-AzureADServicePrincipalPasswordCredential
建立服務主體的密碼認證。
語法
New-AzureADServicePrincipalPasswordCredential
-ObjectId <String>
[-CustomKeyIdentifier <String>]
[-StartDate <DateTime>]
[-EndDate <DateTime>]
[-Value <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
New-AzureADServicePrincipalPasswordCredential Cmdlet 會在 Azure Active Directory (AD) 中建立服務主體的密碼認證。
範例
範例 1
PS C:\> $endDate = (Get-Date).AddYears(1)
PS C:\> New-AzureADServicePrincipalPasswordCredential -ObjectId $sp.ObjectId -EndDate $endDate
此命令會為 1 年到期的服務主體建立密碼認證。
參數
-CustomKeyIdentifier
@{Text=}
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-EndDate
@{Text=}
類型: | 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
指定物件識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-StartDate
@{Text=}
類型: | DateTime |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-Value
@{Text=}
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |