To create a folder in a deployment share using Windows PowerShell

1.   Load the MDT Windows PowerShell snap-in as described in Loading the MDT Windows PowerShell Snap-In.

2.   Ensure that the MDT deployments that share Windows PowerShell drives are restored using the Restore-MDTPersistentDrive cmdlet, as shown in the following example:

Restore-MDTPersistentDrive -Verbose

Note   If the MDT deployments that share Windows PowerShell drives are already restored, you will receive a warning message indicating that the cmdlet is unable to restore the drive.

3.   View the list of MDT deployments that share Windows PowerShell drives, one for each deployment share, using the Get-PSDrive cmdlet as follows:

Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider

The list of Windows PowerShell drives provided using the MDTProvider are listed, one for each deployment share.

4.   Create a folder named Windows_8 in the Operating Systems folder in a deployment share using the mkdir command, as shown in the following example:

mkdir "DS002:\Operating Systems\Windows_8"

In this example, DS002: is the name of a Windows PowerShell drive returned in step 3.

5.   Verify that the folder is created correctly by typing the following command:

dir "DS002:\Operating Systems"

The Windows_8 folder and any other existing folders in the Operating Systems folder is displayed.

6.   Create a folder named Windows_7 folder in the Operating Systems folder in a deployment share using the New-Item cmdlet, as shown in the following example and described in Using the New-Item Cmdlet:

New-Item "DS002:\Operating Systems\Windows_7" -Type directory

The cmdlet displays the successful creation of the folder.

7.   Verify that the folder is created correctly by typing the following command:

dir "DS002:\Operating Systems"

The Windows_7 folder and any other existing folders in the Operating Systems folder is displayed.

Related Topics

Managing Deployment Share Folders Using Windows PowerShell