| external help file | ResourceLocker-help.xml |
|---|---|
| Module Name | ResourceLocker |
| online version | https://github.com/FozzyHosting/ResourceLocker/blob/master/docs/Test-HostResourceLock.md |
| schema | 2.0.0 |
Tests if a computer has a lock of some kind in place.
Test-HostResourceLock [-ComputerName] <String> [[-Type] <String[]>] [[-FolderPathTemplate] <String>]
[[-FileNameTemplate] <String>] [<CommonParameters>]
The function tests if a computer has a lock of some type on it. You can use the -Type parameter to specify in which type exactly you are interested.
PS C:\> Test-HostResourceLock -ComputerName SRV01 -Type HostTests if SRV01 has a lock of the "Host" type on it.
PS C:\> Test-HostResourceLock -ComputerName SRV01Tests if SRV01 has any lock on it.
Specifies the name of a computer to test.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies for which types of locks to look.
Type: String[]
Parameter Sets: (All)
Aliases:
Accepted values: Host, Generic, File, Any
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the template which is used to get a folder where to search for lock files.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: $ModuleWideLockFolderPathTemplate
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the template which is used to distinguish lock files.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: $ModuleWideLockFileNameTemplate
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).