PowerShell Logo Small

Get-NetCompartment



This is the built-in help made by Microsoft for the command 'Get-NetCompartment', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets all network compartments in the protocol stack.

SYNTAX


Get-NetCompartment [-AsJob] [-CimSession <CimSession[]>] [-CompartmentId <UInt32[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-NetCompartment cmdlet gets network compartments in the protocol stack. You can specify the ID of a compartment to get. If you do not specify the CompartmentId
parameter, the cmdlet gets all compartments in the protocol stack.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=313145
Set-NetIPInterface

REMARKS

<

Examples


Example 1: Get a network compartment on the local host

PS C:\>Find-NetCompartment -CompartmentId 1
CompartmentId : 1
CompartmentDescription : Default Compartment
CompartmentGuid : {b1062982-2b18-4b4f-b3d5-a78ddb9cdd49}



This command gets the network compartment that has the ID 1.