Get-DSPasswordPolicy

Synopsis

Get password policies.

Syntax

__AllParameterSets

Get-DSPasswordPolicy [-Name <string>] [<CommonParameters>]

Description

Get one or multiple password policies. Without specifying a name, all policies will be returned.

Examples

Example 1

PS C:\> $template = Get-DSPasswordPolicy -Name "Strong Password"
PS C:\> $script = Get-DSScriptConfigurationSummary -Name "My Propagation Script"
PS C:\> $policy = New-DSAccountLifecyclePolicyInfo -Source Custom -PolicyType Custom
PS C:\> $gateway = Get-DSGateway -Name 'MyGateway'
PS C:\> $policy.Policy.PasswordTemplate.Mode = 'Custom'
PS C:\> $policy.Policy.PasswordTemplate.TemplateID = $template.ID
PS C:\> $policy.Policy.CheckInAction.Mode = 'Custom'
PS C:\> $policy.Policy.CheckInAction.Actions = @('ResetPassword')
PS C:\> $policy.Policy.PasswordReset.ScheduleMode = 'Custom'
PS C:\> $policy.Policy.PasswordReset.ScheduleFrequency = 30
PS C:\> $policy.Policy.PasswordReset.ScheduleFrequencyUnit = 'Day'
PS C:\> $policy.Policy.PasswordReset.ScheduleAtDateTime = Get-Date -Hour 14 -Minute 0 -Second 0
PS C:\> $policy.Policy.Propagation.Mode = 'Custom'
PS C:\> $policy.Policy.Propagation.ScriptConfigurationIds = @($script.ID)
PS C:\> New-DSPamProvider -Name "MyProvider" -CredentialType DomainUser -DomainName "mydomain.loc" -Username "admin" -Password "P@ssw0rd" -AccountLifecyclePolicy $policy -Gateway $gateway

Create a PAM provider with a custom account lifecycle policy and initialize multiple properties to custom values. Note: 'ResetPassword' in CheckInAction.Actions corresponds to the 'Password rotation' option in the UI.

Parameters

-Name

Name of the password policy to fetch.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

Devolutions.RemoteDesktopManager.Business.PasswordConfiguration

Notes

For more information, type "Get-Help Get-DSPasswordPolicy -detailed". For technical information, type "Get-Help Get-DSPasswordPolicy -full".

Devolutions Forum logo Share your feedback