Set-Pcsv
Device
User
Password
Syntax
Set-PcsvDeviceUserPassword
[-TimeoutSec <UInt32>]
[-CurrentCredential] <PSCredential>
[-NewPassword] <SecureString>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-PcsvDeviceUserPassword
[-TargetAddress] <String>
[-Credential] <PSCredential>
[-ManagementProtocol] <ManagementProtocol>
[[-Port] <UInt16>]
[-Authentication <Authentication>]
[-UseSSL]
[-SkipCACheck]
[-SkipCNCheck]
[-SkipRevocationCheck]
[-TimeoutSec <UInt32>]
[-CurrentCredential] <PSCredential>
[-NewPassword] <SecureString>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-PcsvDeviceUserPassword
-InputObject <CimInstance[]>
[-CurrentCredential] <PSCredential>
[-NewPassword] <SecureString>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-PcsvDeviceUserPassword cmdlet changes the password of an existing user on a Physical Computer System View (PCSV) device. To change a password, provide the correct user name and password for the credential. The password length cannot exceed 20 characters. This cmdlet currently supports devices that use the Intelligent Platform Management Interface (IPMI) protocol. You can use this cmdlet for in-band connections only. To use this cmdlet with an in-band connection, you must have elevated privileges.
Examples
Example 1: Change a password
PS C:\>$CurrentCredential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList "DavidChew", (ConvertTo-SecureString -String "CurrentPassword" -AsPlainText -Force)
PS C:\> $NewPassword = ConvertTo-SecureString -String "NewPassword" -AsPlainText -Force
PS C:\> Set-PcsvDeviceUserPassword -CurrentCredential $CurrentCredential -NewPassword $NewPassword
The first command uses the
New-Object
cmdlet to create an instance of the credential for the user account DavidChew.
The command stores that instance in the
$CurrentCredential
variable.
The command uses the
ConvertTo-SecureString
cmdlet to convert the current password to a secure string.
For more information, type
Get-Help New-Object
and
Get-Help ConvertTo-SecureString
.
The second command converts a new password to a secure string, and then stores that password in the $NewPassword variable.
The third command changes the password for the user DavidChew. It specifies the current credential stored in $CurrentCredential and the new password for the user as a secure string.
Required Parameters
Specifies a
PSCredential
object based on a user name and password.
To obtain a
PSCredential
object, use the
Get-Credential
cmdlet.
For more information, type
Get-Help Get-Credential
.
For IPMI devices, specify credentials that correspond to a user with Administrator privileges on the device.
Type: | PSCredential |
Position: | 2 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies a PSCredential object based on the current user name and password.
Type: | PSCredential |
Position: | 3001 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the input object that is used in a pipeline command.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Specifies a management protocol used to communicate with a device. The acceptable values for this parameter are:
- WSMAN
- IPMI
This cmdlet currently supports only devices that use the IPMI protocol.
Type: | ManagementProtocol |
Aliases: | MP |
Parameter Sets: | WSMan, IPMI |
Position: | 3 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the new password, as a secure string, for the user that the
CurrentCredential
parameter specifies.
To obtain a secure string, use the
ConvertTo-SecureString
cmdlet.
For more information, type
Get-Help ConvertTo-SecureString
.
Type: | SecureString |
Position: | 3002 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name or IP address of the remote hardware device.
Type: | String |
Aliases: | CN, ComputerName, IpAddress |
Position: | 1 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Optional Parameters
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an authentication method to use for devices managed by WS-Management. Do not specify this parameter for devices managed by using IPMI. The acceptable values for this parameter are:
- Basic
- Digest
- Default
Type: | Authentication |
Parameter Sets: | Default, Basic, Digest |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Passthru
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a port on the remote computer to use for the management connection. If you do not specify a port, the cmdlet uses the following default ports:
- IPMI and WSMAN over HTTP. Port 623.
- WSMAN over HTTPS. Port 664.
Type: | UInt16 |
Position: | 4 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Indicates that the client connects by using HTTPS without validating that a trusted certification authority (CA) signed the server certificate. Do not specify this parameter if you specify a value of IPMI for the ManagmentProtocol parameter.
Do not specify this parameter unless you can establish trust in another way, such as if the remote computer is part of a network that is physically secure and isolated, or if the remote computer is a trusted host in a Windows Remote Management (WinRM) configuration.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Indicates that the certificate common name (CN) of the server does not need to match the host name of the server. Do not specify this parameter if you specify a value of IPMI for the ManagmentProtocol parameter.
Specify this parameter only for managing devices by using WSMAN over HTTPS. Be sure to specify this parameter only for trusted computers.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Indicates that the cmdlet skips the revocation check of server certificates.
Be sure to specify this parameter only for trusted computers.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of
0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies how long to wait, in seconds, for a response from the remote hardware device. After this period, the cmdlet abandons the connection attempt.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Indicates that the server connects to the target computer by using SSL. WSMAN encrypts all content transmitted over the network. Specify this parameter to use the additional protection of HTTPS instead of HTTP. If you specify this parameter and SSL is not available on the connection port, the command fails.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Microsoft.Management.Infrastructure.CimInstance, Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/HardwareManagement/MSFT_PCSVDevice
This cmdlet returns a PCSV device object, if you specify the PassThru parameter.