This section describes the Restore-MDTPersistentDrive Windows PowerShell cmdlet. Run this cmdlet from a Windows PowerShell console that has the MDT PowerShell snap-in loaded. For more information on how to start a Windows PowerShell console that has the MDT PowerShell snap-in loaded, see Loading the MDT Windows PowerShell Snap-In.
Syntax
Restore-MDTPersistentDrive [-Force] [<CommonParameters>]
Description
This cmdlet restores a persisted MDT Windows PowerShell drive to the list of active Windows PowerShell drive for each deployment share that was added to the list of persisted MDT Windows PowerShell drives. The list of persisted MDT Windows PowerShell drives is managed using the Add-MDTPersistentDrive and Remove-MDTPersistentDrive cmdlets or the Deployment Workbench.
This cmdlet calls the New-PSDrive cmdlet to create a Windows PowerShell drive for each drive in the MDT persisted list. Persisted MDT Windows PowerShell drives are similar to persisted network drive mappings.
Note This list of persisted MDT Windows PowerShell drives is maintained on a per-user basis and are stored in the user profile.
Parameters
This subsection provides information about the various parameters that can be used with the Restore-MDTPersistentDrive cmdlet.
-Force [<SwitchParameter>]
This parameter specifies that the deployment share should be upgraded when restored (if required). If this parameter is:
· Provided, then the deployment share will be upgraded when restored (if required)
· Omitted, then deployment share will not be upgraded when restored
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
True (ByValue) |
Accept wildcard characters? |
False |
<CommonParameters>
This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see the topic, “about_CommonParameters,” which you can access by typing the following command, and then pressing ENTER:
Get-Help about_CommonParameters
Outputs
This cmdlet outputs a PSObject type object for each MDT Provider Windows PowerShell drive that is restored.
Example 1
Get-MDTPersistentDrive
Description
This example restores the list of MDT persisted drives, by creating a Windows PowerShell drive using the MDTProvider type. The deployment share will not be upgraded when restored.
Example 2
Get-MDTPersistentDrive -Force
Description
This example restores the list of MDT persisted drives, by creating a Windows PowerShell drive using the MDTProvider type. The deployment share will be upgraded when restored (if required).
Related Topics