6/6/2023 0 Comments Powershell cd to network drive![]() This includes fixed drives, logical partitions, mapped network drives, and temporaryĭrives that you create by using the New-PSDrive cmdlet. This command gets all of the drives that are supported by the Windows PowerShell FileSystem G 202.06 710.91 FileSystem \\Music\GratefulDead ![]() ![]() Example 3: Get all the drives that are supported by the Windows PowerShell file system provider PS C:\> Get-PSDrive -PSProvider FileSystem Note that the drive letter in the command is notįollowed by a colon. This command gets the D: drive on the computer. Example 2: Get a drive on the computer PS C:\foo> Get-PSDrive D PowerShell providers (Alias:, Cert:, Env:, Function:, HKCU:, HKLM:, and Variable:). The output shows the hard drive (C:), CD-ROM drive (D:), and the drives exposed by the Windows This command gets the drives in the current session. Examples Example 1: Get drives in the current session PS C:\> Get-PSDrive Similarly, when an external drive is disconnectedįrom the computer, Windows PowerShell automatically deletes the PSDrive that represents the removedĭrive. You do not need to restart Windows PowerShell. The first command uses Get-PSDrive to get all of the file system drives in the session. Windows PowerShell automatically adds a PSDrive to the file system that represents the new drive. This example demonstrates different ways to display drives in Windows PowerShell, and it shows that session-specific drives created by using the New-PSDrive cmdlet are accessible only in Windows PowerShell. For more information, see New-PSDrive.Īlso, beginning in Windows PowerShell 3.0, when an external drive is connected to the computer, Session-specified temporary drives and persistent mapped network drives that you create by usingīeginning in Windows PowerShell 3.0, the Persist parameter of the New-PSDrive cmdlet canĬreate mapped network drives that are saved on the local computer and are available in other.Drives exposed by PowerShell providers (such as the Certificate:, Function:, and Alias:ĭrives) and the HKLM: and HKCU: drives that are exposed by the Windows PowerShell Registry.Windows logical drives on the computer, including drives mapped to network shares.This cmdlet gets the following types of drives: The Get-PSDrive cmdlet gets the drives in the current session.
0 Comments
Leave a Reply. |