Remove-NfsNetgroup

Removes a netgroup.

Syntax

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

Description

The Remove-NfsNetgroup cmdlet removes a netgroup.

You can remove netgroups that are stored in Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS) only. To remove a netgroup that is stored in Network Information Service (NIS), use the corresponding NIS administration tool. For more information about how to manage an NIS server, see Server for NIS Administration.

If you do not specify a netgroup store, the Remove-NfsNetgroup cmdlet removes the netgroup from a netgroup store that is configured on the local computer.

Examples

Example 1: Remove an NFS netgroup

PS C:\> Remove-NfsNetgroup -NetGroupName "AppServers" -LdapInstanceName "Contoso.com"

This command removes an NFS netgroup that is named AppServers from a netgroup store in Contoso.com.

Example 2: Remove an NFS netgroup from a configured store

PS C:\>Remove-NfsNetgroup -NetGroupName "AppServers"

This command removes an NFS netgroup that is named AppServers. Because the netgroup store is not specified, the cmdlet removes the netgroup from the netgroup store that is configured on the local NFS server.

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

-LdapNamingContext

Specifies the Lightweight Directory Access Protocol (LDAP) naming context of a netgroup store.

Type:String
Aliases:dn
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-LdapServer

Specifies an LDAP server name of a netgroup store.

Type:String
Aliases:ldap
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-NetGroupName

Specifies the name of a netgroup to remove.

Type:String
Aliases:name, ngname
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

Outputs

Nothing