Drives

PowerShell will automatically create a drive for any disk with a drive letter, any existing shared drive, the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER registry hives, the certificate store, and so on.

Additional drives may be added using New-PSDrive; for example, a network drive can be created:

New-PSDrive X -PSProvider FileSystem -Root \ServerShare 
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT 

Existing drives may be removed using Remove-PSDrive. PowerShell allows filesystem drives to be removed; however, this is not a destructive operation, and it only removes the reference to the drive from PowerShell.

The filesystem provider supports the use of credentials when creating a drive, allowing network shares to be mapped using specific credentials.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.53.68