次の方法で共有


Remove-SCServerFeature

Removes an operating system role or feature from a guest operating system profile.

Syntax

OSProfile

Remove-SCServerFeature
    -ServerFeature <ServerFeature>
    -GuestOSProfile <GuestOSProfile>
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Template

Remove-SCServerFeature
    -ServerFeature <ServerFeature>
    -VMTemplate <Template>
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-SCServerFeature cmdlet deletes an operating system role or feature from a guest operating system profile.

Examples

Example 1: Remove a server feature from a guest operating system profile

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

The first command gets the gues operating system profile 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 removes the server feature stored in $Feature from the guest operating system profile stored in $OSProfile.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

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

-GuestOSProfile

Specifies a guest operating system profile object.

Parameter properties

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

Parameter sets

OSProfile
Position:Named
Mandatory:True
Value from pipeline:False
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

-ServerFeature

Specifies a server feature object.

Parameter properties

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

-VMTemplate

Specifies a VMM template object used to create virtual machines.

Parameter properties

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

Parameter sets

Template
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

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