Remove-SCVMConfiguration
Removes a virtual machine configuration object from VMM.
Syntax
Remove-SCVMConfiguration
[-VMConfiguration] <BaseVMConfiguration>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Description
The Remove-SCVMConfiguration cmdlet removes a virtual machine configuration object from Virtual Machine Manager (VMM).
Examples
Example 1: Remove a virtual machine configuration
PS C:\> $VMConfig = Get-SCVMConfiguration -All | where {$_.Name -eq "VMConfig01"}
PS C:\> Remove-SCVMConfiguration -VMConfiguration $VMConfig
The first command gets all virtual machine configuration objects, selects the object named VMConfig01 and then stores that virtual machine configuration object in the $VMConfig variable.
The second command removes the virtual machine configuration in $VMConfig (VMConfig01).
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | 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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
Specifies the name of a user. This cmdlet sets the on behalf of user as the user that this parameter specifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
Specifies a user role. This cmdlet sets the on behalf of user role as the user role that this parameter specifies. To obtain a user role object, use the Get-SCUserRole cmdlet.
Type: | UserRole |
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 |
-VMConfiguration
Specifies a virtual machine configuration object.
Type: | BaseVMConfiguration |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Notes
- Requires a VMM virtual machine configuration object, which can be objtained by using the Get-SCVMConfiguration cmdlet.