Udostępnij za pośrednictwem


Set-SCDriverPackage

Updates the properties of an existing driver package object.

Syntax

Default (Default)

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.

Parameter properties

Type:DriverPackage
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

System.Collections.Generic.List`1[System.String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

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.

Outputs

DriverPackage

This cmdlet returns an array of DriverPackage objects.