Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Revoke-NfsClientLock

Revoke-NfsClientLock

msft_nfsclientlock.cmdletdefinition.cdxml

Synopsis

Releases file locks that a client computer holds on an NFS server.

Syntax

Revoke-NfsClientLock [-Path] [-LockType] [-StateId] [-AsJob] [-CimSession] [-PassThru] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Revoke-NfsClientLock [-AsJob] [-CimSession] [-PassThru] [-ThrottleLimit] [-InputObject] [-Confirm] [-WhatIf] [<CommonParameters>]

Revoke-NfsClientLock [-Path] [-LockType] [-ComputerName] [-AsJob] [-CimSession] [-PassThru] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Revoke-NfsClientLock cmdlet releases locks that a client computer currently holds for files that a Network File System (NFS) server shares. You can select the locks to revoke by specifying the path of the files. The Path parameter supports wildcards, so you can revoke multiple locks that match the specified pattern.

You can revoke NFS v4 protocol locks by specifying the state identifier of the locked files. You can revoke NFS v3 protocol locks by specifying the computer name of the NFS client that holds the lock on the files.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CimSession <CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ComputerName <String>

Specifies the host name of the client computer that holds a lock to files on the NFS server.

Aliases

client,name,ClientComputer

Required?

false

Position

3

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-LockType <ClientLockType[]>

Specifies an array of lock types on the file. Valid values are NLM and NFS.

Locks acquired by NFS clients that mount files to an NFS share by using the NFS v2 or the NFS v3 protocol are Network Lock Manager (NLM) locks. Locks acquired by NFS clients that mount files by using the NFS v4.1 protocol are NFS locks.

Aliases

type

Required?

false

Position

2

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Path <String[]>

Specifies an array of paths and file names on the NFS server. If there are multiple clients that have multiple locks on the same file, all the locks are revoked.

Aliases

file,LockedFile

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StateId <String>

Specifies the state identifier of the locks to revoke. StateId applies only to locks that an NFS client acquires by using the NFS v4.1 protocol.

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-ThrottleLimit <Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

Nothing

Notes

None

Examples

Example 1: Revoke the lock on all files

This command revokes the lock on all the files on a local NFS server that have a path that begins with c:\shares\.

PS C:\> Revoke-NfsClientLock -Path c:\shares\*

Online Version
Get-NfsClientLock