2022-07-27發表PowerShell1 分鐘讀完 (大約131個字)(PowerShell)New-PSDriveSyntax1234567891011New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Description <String>] [-Scope <String>] [-Persist] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]Ex: 建立映射到網路共享的暫存磁碟1234567891011# 建立名為Public的暫存磁碟,映射到\\Server01\PublicNew-PSDrive -Name "Public" -PSProvider "FileSystem" -Root "\\Server01\Public"# 建立暫存磁碟後,可透過Get-Item或Get-ChildItem取得內容, 磁碟名稱後的冒號(:)記得一定要加Get-ChildItem Public:Get-Item Public:# 新增/搬移/複製/刪除暫存磁碟檔案或目錄Move-Item "xxx.txt" -Destination "Public:"Copy-Item "xxx.txt" -Destination "Public:\AANew-Item "Public:\LogArchive" -ItemType "Directory"#WindowsPowerShell