New-NfsNetgroup

New-NfsNetgroup

Creates a netgroup.

Sintaxis

Parameter Set: Default
New-NfsNetgroup [-NetGroupName] <String> [[-AddMember] <String[]> ] [[-LdapServer] <String> ] [[-LdapNamingContext] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

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.

Parámetros

-AddMember<String[]>

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

Alias

add

¿Requerido?

false

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LdapNamingContext<String>

Specifies the LDAP naming context of the new netgroup store.

Alias

dn

¿Requerido?

false

¿Posición?

4

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LdapServer<String>

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.

Alias

ldap

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NetGroupName<String>

Specifies the name of a new netgroup.

Alias

name,ngname

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.FileServices.Powershell.Nfs.NetGroup

Ejemplos

Example 1: Create a netgroup and add a member

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

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

Example 2: Create a netgroup and add multiple members

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

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

Temas relacionados

Get-NfsNetgroup

Remove-NfsNetgroup

Set-NfsNetgroup