Restore-PSCredential¶
SYNOPSIS¶
Restores a PSCredential object from a file.
SYNTAX¶
__AllParameterSets¶
Restore-PSCredential [-Path] <FileInfo> [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION¶
The Restore-PSCredential function retrieves a PSCredential object that was previously saved using Save-PSCredential.
It reads the file from the specified path and ensures the content is a valid PSCredential object before returning it.
EXAMPLES¶
EXAMPLE 1¶
Restore-PSCredential -Path 'C:\secure\mycredential.cred'
Restores the PSCredential object from the file located at C:\secure\mycredential.cred.
EXAMPLE 2¶
'C:\secure\mycredential.cred' | Restore-PSCredential
Uses pipeline input to restore the PSCredential object from the specified file path.
PARAMETERS¶
-Path¶
Specifies the path to the credential file to restore.
Type: System.IO.FileInfo
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
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.
INPUTS¶
System.IO.FileInfo¶
{{ Fill in the Description }}
OUTPUTS¶
System.Management.Automation.PSCredential¶
{{ Fill in the Description }}