Add-SCServerFeature

Adds an operating system role or feature to a guest operating system profile.

Syntax

Add-SCServerFeature
   [-VMMServer <ServerConnection>]
   -ServerFeature <ServerFeature>
   -GuestOSProfile <GuestOSProfile>
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]
Add-SCServerFeature
   [-VMMServer <ServerConnection>]
   -ServerFeature <ServerFeature>
   -VMTemplate <Template>
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The Add-SCServerFeature cmdlet adds an operating system role or feature to a guest operating system profile. The role or feature is automatically installed during machine deployment and servicing operations.

Examples

Example 1: Add a server feature to a guest operating system profile

PS C:\> $OSProfile = Get-SCGuestOSProfile -Name "NewOSProfile01"
PS C:\> $Feature = Get-SCServerFeature -Name "Failover-Clustering"
PS C:\> Add-SCServerFeature -GuestOSProfile $OSProfile -ServerFeature $Feature

The first command gets the guest operating system profile object named NewOSProfile01 and stores the object in the $OSProfile variable.

The second command gets the server feature object named Failover-Clustering and stores the object in the $Feature variable.

The last command adds the server feature stored in $Feature (Failover-Clustering) to the guest operating system profile stored in $OSProfile (NewOSProfile01).

Parameters

-GuestOSProfile

Specifies a guest operating system profile object.

Type:GuestOSProfile
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

-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

-ServerFeature

Specifies a server feature object.

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

-VMTemplate

Specifies a VMM template object used to create virtual machines.

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

Outputs

ServerFeature

This cmdlet returns a ServerFeature object.