Set-SCDriverPackage
Updates the properties of an existing driver package object.
Syntax
Set-SCDriverPackage
[-VMMServer <ServerConnection>]
[-DriverPackage] <DriverPackage>
-Tag <System.Collections.Generic.List`1[System.String]>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
The Set-SCDriverPackage cmdlet updates the properties of an existing driver package object.
Examples
Example 1: Update the tags for a set of driver packages
PS C:\> $Drivers = Get-SCDriverPackage -Tag "Production"
PS C:\> ForEach ($Driver in $Drivers) {Set-SCDriverPackage -DriverPackage $Driver -Tag {Production, NewTag}}
The first command gets all driver package objects that have a tag value of Production and stores the objects in the $Drivers object array.
The second command uses the ForEach statement to add the value "NewTag" to each driver package object stored in $Drivers.
For information about the PowerShell ForEach statement, type Get-Help about_Foreach
.
Parameters
-DriverPackage
Specifies a driver package object.
Type: | DriverPackage |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Specifies a Virtual Machine Manager (VMM) server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
DriverPackage[]
This cmdlet returns an array of DriverPackage objects.