Lock-DPMLibraryDoor

Locks the door of a DPM library.

Syntax

Lock-DPMLibraryDoor [-DPMLibrary] <Library> [-Async]
 [-DoorAccessJobStateChangeEventHandler <DoorAccessJobStateChangeEventHandler>] [-Confirm] [-WhatIf]
 [<CommonParameters>]

Description

The Lock-DPMLibraryDoor cmdlet locks the door of a System Center 2016 - Data Protection Manager (DPM) library.

Examples

Example 1: Lock a library door

PS C:\>$DpmLibrary = Get-DPMLibrary -DPMServerName "DPMServer07"
PS C:\> Lock-DPMLibraryDoor -DPMLibrary $DpmLibrary[0]

The first command gets the libraries associated with the server, and then stores the library objects in the $DpmLibrary variable.

The second command locks the library door for the first library object stored in $DpmLibrary. This DPM server has more than one library. Therefore, the command uses standard Windows PowerShell array syntax to specify the first member of the $DpmLibrary array.

Parameters

-Async

Indicates that the command runs asynchronously. When you run a command asynchronously, the command prompt returns immediately even if the job takes an extended time to finish.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DoorAccessJobStateChangeEventHandler

Specifies an event handler for certain door access events. You can use this parameter to update a GUI that runs in Windows PowerShell, but do not use it in the Windows PowerShell console.

Type:DoorAccessJobStateChangeEventHandler
Aliases:Handler
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DPMLibrary

Specifies a DPM library object that this cmdlet locks. To obtain a DPM library object, use the Get-DPMLibrary cmdlet.

Type:Library
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False