Remove-SCLogicalNetwork
Deletes a logical network object.
Syntax
Remove-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[-LogicalNetwork] <LogicalNetwork>
[-Force]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-SCLogicalNetwork cmdlet deletes a Virtual Machine Manager (VMM) logical network object.
If any logical network definition, virtual machine template, or service template object references a specific logical network object, that logical network object is not deleted.
Examples
Example 1: Delete a logical network
PS C:\> $LogicalNetwork = Get-SCLogicalNetwork "LogicalNetwork01"
PS C:\> Remove-SCLogicalNetwork -LogicalNetwork $LogicalNetwork
The first command gets the logical network object named LogicalNetwork01 and stores it in the $LogicalNetwork variable.
The second command deletes the logical network object stored in $LogicalNetwork.
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 |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
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 |
-LogicalNetwork
Specifies a logical network. A logical network is a named grouping of IP subnets and virtual local area networks (VLANs) that is used to organize and simplify network assignments.
Type: | LogicalNetwork |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Outputs
LogicalNetwork
This cmdlet returns a LogicalNetwork object.
Notes
- Requires a VMM logical network object, which you can retrieve by using the Get-SCLogicalNetwork cmdlet.