Set-SCApplicationPackage

Modifies the properties of an application package.

Syntax

Set-SCApplicationPackage
   [-UserRole <UserRole>]
   [-Enabled <Boolean>]
   [-VMMServer <ServerConnection>]
   [-ApplicationPackage] <ApplicationPackage[]>
   [-EncryptionKey <PSCredential>]
   [-Name <String>]
   [-SharePath <String>]
   [-Description <String>]
   [-Owner <String>]
   [-FamilyName <String>]
   [-Release <String>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]
Set-SCApplicationPackage
   [-VMMServer <ServerConnection>]
   [-ApplicationPackage] <ApplicationPackage[]>
   [-SetAsEquivalent]
   -FamilyName <String>
   -Release <String>
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Set-SCApplicationPackage cmdlet modifies the properties of an application package stored in the Virtual Machine Manager (VMM) library.

Examples

Example 1: Update the description for an application package

PS C:\> $AppPackage = Get-SCApplicationPackage -Name "WebApp01.zip"
PS C:\> Set-SCApplicationPackage -ApplicationPackage $AppPackage -Description "Web application to install on a service."

The first command gets the application package object named WebApp01.zip and stores the object in the $AppPackage variable.

The second command updates the description for WebApp01.zip.

Parameters

-ApplicationPackage

Specifies an array of application package objects.

Type:ApplicationPackage[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Description

States a description for the specified object.

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

-Enabled

Enables an object when set to $True, or disables an object when set to $False. For example, if you want to upgrade software on a virtual machine template, you can disable the template object in the VMM library to temporarily prevent users from using that object.

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

-EncryptionKey

Specifies credentials to be used as an encryption key when you add a Hyper-V host located in a perimeter network to VMM.

Example format: -SecurityFile "C:\SecurityFile.txt" -EncryptionKey $Key

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

-FamilyName

Specifies a family name for a physical resource in the VMM library. This value is used in conjunction with Release, Namespace, and Type to establish equivalency among library resources.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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

-Name

Specifies the name of a VMM object.

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

-Owner

Specifies the owner of a VMM object in the form of a valid domain user account.

  • Example format: -Owner "Contoso\PattiFuller"
  • Example format: -Owner "PattiFuller@Contoso"
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

-Release

Specifies a string that describes the release of a library resource. VMM automatically creates a release value for every resource imported into the library. After the resource has been imported, the string can be customized.

Type:String
Position:Named
Default value:None
Required:True
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

-SetAsEquivalent

Indicates that the cmdlet marks multiple application packages as equivalent.

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

-SharePath

Specifies a path to a valid library share on an existing library server that uses a Universal Naming Convention (UNC) path.

Example format: -SharePath "\\LibServer01\LibShare"

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

-UserRole

Specifies a user role object.

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

-VMMServer

Specifies a VMM server object.

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

Outputs

ApplicationPackage

This cmdlet returns an ApplicationPackage object.