Invoke-BluGenieThreadLock

Invoke-BluGenieThreadLock
SYNOPSIS
Create a named Mutex
SYNTAX
Invoke-BluGenieThreadLock [-ShowLocks] [-Walkthrough] [<CommonParameters>]
Invoke-BluGenieThreadLock [-setLock] [[-lockName] <String>] [-timeOut <Int32>] [-GlobalName <String>] [-Walkthrough] [<CommonParameters>]
Invoke-BluGenieThreadLock [-releaseLock] [[-lockName] <String>] [-timeOut <Int32>] [-GlobalName <String>] [-Walkthrough] [<CommonParameters>]DESCRIPTION
With a named mutex, we can specify a mutex with a name on one process and then tell it to take the mutex and on another process (yes, another PowerShell console would work) and call the same named mutex and if we attempt to take the mutex, it will create a blocking call until the other process relinquishes control of it. What this allows us to do is have multiple processes that can write to a single file without fear of missing data due to the file being locked.
EXAMPLES
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
PARAMETERS
setLock
releaseLock
lockName
timeOut
GlobalName
ShowLocks
Walkthrough
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Last updated