Remove-SCOperatingSystem

Deletes an operating system from an application profile.

Syntax

Remove-SCOperatingSystem
      [-VMMServer <ServerConnection>]
      -ApplicationProfile <ApplicationProfile>
      -OperatingSystem <OperatingSystem>
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCOperatingSystem cmdlet deletes an operating system from an application profile.

Examples

Example 1: Remove all operating systems from a specified application profile

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $OS = $AppProfile.OperatingSystems[0]
PS C:\> Remove-SCOperatingSystem -ApplicationProfile $AppProfile -OperatingSystem $OS

The first command gets the application profile object named SvcWebAppProfile01 and stores it in the $AppProfile variable.

The second command gets the first operating system object stored in the OperatingSystems property of the application profile stored in $AppProfile and stores the object in the $OS variable.

The last command removes the operating system stored in $OS from the application profile stored in $AppProfile.

Required Parameters

-ApplicationProfile

Specifies an application profile object.

Type:ApplicationProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OperatingSystem

Specifies the type of operating system for a virtual machine.

To list the names of all available operating systems in Virtual Machine Manager (VMM), type Get-SCOperatingSystem.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

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

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False