Skip to content

Latest commit

 

History

History
110 lines (83 loc) · 2.59 KB

Get-AdmPwdPassword.md

File metadata and controls

110 lines (83 loc) · 2.59 KB
external help file Module Name schema
AdmPwd.PS.dll-Help.xml
AdmPwd.PS
2.0.0

Get-AdmPwdPassword

SYNOPSIS

Finds admin password for given computer.

SYNTAX

Get-AdmPwdPassword [-ComputerName] <String> [-IncludeHistory] [[-ForestDnsName] <String>] [-IsDeleted] [<CommonParameters>]

DESCRIPTION

Finds local admin password and password expiration timestamp for given computer. Optionally returns password history, if target computer is configured to maintain password history.

EXAMPLES

Example 1

(Get-AdmPwdPassword -ComputerName:MyComputer -IncludeHistory).passwordHistory

Gets password of local administrator on computer MyComputer, including password history

PARAMETERS

-ComputerName

Name of the computer to get admin password for

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ForestDnsName

DNS Name of AD forest where to find. If not specified, forest where PDS is installed is used.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeHistory

Whether to include password history into returned data

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsDeleted

Whether or not to look for deleted computer object

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

System.String[]

System.Boolean

System.String

OUTPUTS

AdmPwd.Types.PasswordInfo

NOTES

Caller needs to be delegated the permission to read local admin password for given computer. If this permissiosn is not granted, Access Denied error is returned.

With switch IsDeleted, if multiple deleted computers with the same name is found, password for most recently deleted machine is returned

RELATED LINKS