| external help file | krbtgtRotate-help.xml |
|---|---|
| online version | |
| schema | 2.0.0 |
Set the password for the krbtgt user.
Set-KrbtgtPassword [-Password] <String> [[-User] <String>] [[-Server] <String>] [[-Credential] <PSCredential>]
Sets the password for the krbtgt user temporarily, the system will automatically rotate this password on change. This function exists only to trigger the change and to meet the domain environment requirements.
-Required modules ActiveDirectory
-Required functions Write-LogMessage
-PS Script Analyzer exceptions -PSAvoidUsingPlainTextForPassword - In order to evaluate the password for complexity and pattern matching, it must be in plain text. -PSAvoidUsingConvertToSecureStringWithPlainText - In order to use the password which has been evaluated for complexity, length and overall compliance with domain policy, plain text (which must be changed to a secure string) is used. -PSAvoidUsingUserNameAndPassWordParams - Because both the user object and password are being evaluated (complexity check), using descriptive parameters is better than using compliant albeit vague or misleading names. -PSUseShouldProcessForStateChangingFunctions - There is a 'ShouldProcess' gate at the meta function (Invoke-KrbtgtRotate) that calls this function.
PS > Set-KrbtgtPassword -Password "SuperComplex!Password1" -User krbtgt -Server DC01.contoso.com
True
The boolean value returned indicates the success (or failure) of the action. In the example above, the rotation succeeded.
PS > Set-KrbtgtPassword -Password "SuperComplex!Password1"
True
The boolean value returned indicates the success (or failure) of the action. In the example above, the rotation succeeded. Using the default parameter values for 'User' and 'Server'.
Specifies the string to be used for setting the krbtgt account password.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value:
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the user account to where the password will be changed; default is 'krbtgt'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Krbtgt
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the domain controller that should be the target for setting the password. Default is the PDCEmulator.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: (Get-ADDomain).PDCEmulator
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the credentials to use when setting the password; optional.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value:
Accept pipeline input: False
Accept wildcard characters: False- description for PSSA rule exceptions
- more suppressed PSSA rules
- silly attribute games on 'Credential' parameter to satisfy PSSA
- proper help added
- added exception to PSScriptAnalyzer rules
- rework of several pieces, bumping to v0.2.0 for module
- initial creation