Add-PSUComputerTag
SYNOPSIS
Adds a tag to a registered PowerShell Universal computer.
SYNTAX
Id
Add-PSUComputerTag [-Id] <Int64> [-Name <String>] [-Value <String>] [-ComputerName <String>]
[-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate]
[-Cookies] [<CommonParameters>]Computer
Add-PSUComputerTag [-Computer] <Computer> [-Name <String>] [-Value <String>] [-ComputerName <String>]
[-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate]
[-Cookies] [<CommonParameters>]DESCRIPTION
Adds a new tag entry to an existing computer and writes the created tag to the pipeline. You can target the computer by Id or pass an existing computer object through the pipeline.
EXAMPLES
Example 1
Adds the Environment=Production tag to the computer with Id 42.
PARAMETERS
-AppToken
Specifies the app token to use when authenticating to the PowerShell Universal management API.
-Computer
Specifies the computer to target.
-ComputerName
Specifies the URL or host name of the target PowerShell Universal instance. Bare host names are normalized to an http://<host>:5000 URL.
-Cookies
Reuses and persists authentication cookies for the current PowerShell session.
-Credential
Specifies the credentials to use for Basic authentication against the PowerShell Universal management API.
-Id
Specifies the numeric Id of the resource.
-Integrated
Uses the in-process integrated management client when the cmdlet runs inside PowerShell Universal.
-Name
Specifies the name of the resource.
-TrustCertificate
Allows connections to servers with untrusted TLS certificates.
-UseDefaultCredentials
Uses the current Windows credentials when authenticating to the management API.
-Value
Specifies the value to store or assign.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.
INPUTS
PowerShellUniversal.Computer
OUTPUTS
System.Object
NOTES
RELATED LINKS
PERMISSIONS
The access token requires platform.computers/update to run this cmdlet remotely.
Last updated
Was this helpful?