Skip to content

Latest commit

 

History

History
105 lines (79 loc) · 2.11 KB

New-Credential.md

File metadata and controls

105 lines (79 loc) · 2.11 KB
external help file Module Name online version schema
ComputerManagement-help.xml
ComputerManagement
2.0.0

New-Credential

SYNOPSIS

Create a Credential Object

SYNTAX

New-Credential [-Username] <String> [-Password] <SecureString> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This function creates a new Credential Object for use in Scripts or cmdlets.

EXAMPLES

Example 1

PS C:\> $Credential = New-Credential -Username user1 -Password (ConvertFrom-SecureString "P@ssw0rd" -AsPlainText -Force)

Creating a credential

PARAMETERS

-Password

A Password as a SecureString

Type: System.Security.SecureString
Parameter Sets: (All)
Aliases:

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

-Username

The username associated with the password

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
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

None

OUTPUTS

System.Object

NOTES

RELATED LINKS