Edit

Share via


New-NfsNetgroup

Creates a netgroup.

Syntax

Default (Default)

New-NfsNetgroup
    [-NetGroupName] <String>
    [[-AddMember] <String[]>]
    [[-LdapServer] <String>]
    [[-LdapNamingContext] <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-NfsNetgroup cmdlet creates a netgroup. It can also add members to the new netgroup. The netgroup provides access to shares that Network File System (NFS) server exports.

You can create a netgroup in Active Directory Domain Services (AD DS), on an Active Directory Lightweight Directory Services (AD LDS) server, or on Lightweight Directory Access Protocol (LDAP) servers. If you do not specify a netgroup store, New-NfsNetgroup creates a netgroup in the netgroup store that is configured on the local computer.

The cmdlet creates the netgroup as a relative distinguished name in an LDAP naming context (directory partition). For example, if the specified naming context is DN=netgroups,CN=Contoso,CN=com", the distinguished name of the netgroup Contoso-PrintServices is "DN= Contoso-PrintServices ,DN=netgroups,CN=Contoso,CN=com".

You can group NFS client computers logically into netgroups to easily manage mount permissions for all the computers that are in the group. Because netgroups are a server-side setting, New-NfsNetgroup is not available on client operating systems.

Examples

Example 1: Create a netgroup and add a member

PS C:\> New-NfsNetgroup -NetGroupName "Contoso-PrintServices" -AddMember "Contoso-PS02" -LdapInstanceName "Contoso.com" -LdapNamingContext "CN=MappedIdentity,DC=Contoso,DC=com"

This command creates a netgroup that is named Contoso-PrintServices and adds one member that is named Contoso-PS02.

Example 2: Create a netgroup and add multiple members

PS C:\> New-NfsNetgroup -NetGroupName "AppServers" -AddMember "Contoso-APPS-11","Contoso-APPS-12" -LdapServer "Contoso.com" -LdapNamingContext "CN=netgroup,DC=Contoso,DC=com"

This command creates a netgroup that is named AppServers and adds two members that are named Contoso-APPS-11 and Contoso-APPS-12.

Parameters

-AddMember

Specifies the host names or IP addresses of the client computers to add to a netgroup.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:add

Parameter sets

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

-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

-LdapNamingContext

Specifies the LDAP naming context of the new netgroup store.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:dn

Parameter sets

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

-LdapServer

Specifies the LDAP server name of the new netgroup store. The LDAP server name can be a ___domain name, AD LDS server name, or other LDAP server name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ldap

Parameter sets

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

-NetGroupName

Specifies the name of a new netgroup.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:name, ngname

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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.

Outputs

Microsoft.FileServices.Powershell.Nfs.NetGroup