編集

次の方法で共有


Remove-NfsNetgroup

Removes a netgroup.

Syntax

Default (Default)

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.

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 Lightweight Directory Access Protocol (LDAP) naming context of a netgroup store.

Parameter properties

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

Parameter sets

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

-LdapServer

Specifies an LDAP server name of a netgroup store.

Parameter properties

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

Parameter sets

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

-NetGroupName

Specifies the name of a netgroup to remove.

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

Nothing