Add-SCServerFeature

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

Syntax

Add-SCServerFeature -GuestOSProfile <GuestOSProfile> [-JobVariable <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] -ServerFeature <ServerFeature> [-VMMServer <ServerConnection>] [<CommonParameters>]
Add-SCServerFeature [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 -ServerFeature <ServerFeature> [-VMMServer <ServerConnection>] -VMTemplate <Template> [<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
Required:True
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerFeature

Specifies a server feature object.

Type:ServerFeature
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMTemplate

Specifies a VMM template object used to create virtual machines.

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

Outputs

ServerFeature

This cmdlet returns a **ServerFeature** object.