Get-Location [-Stack] [-StackName <String[]>] [<CommonParameters>]说明Get-Location cmdlet 获取表示当前目录的对象,这与打印工作目录 (pwd) 命令非常类似。在PowerShell 驱动器之间移动时,PowerShell 会在每个驱动器中保留位置。 可以使用此 cmdlet 查找每个驱动器中的位置。可以使用此 cmdlet 在运行时获取当...
Push-Location-Path"Local Settings" 然后,可以将“本地设置”位置推送到堆栈上,并将其移动到临时文件夹,方法是通过键入: PowerShell Push-Location-PathTemp 你可以验证是否通过输入Get-Location命令更改了目录: PowerShell Get-Location Output Path --- C:\Documents and Settings\PowerUser\Local Settings\Temp 然...
在PowerShell 中,可以使用 Get-Location 命令来确定当前工作位置,可以使用 Set-Location 命令设置当前工作位置。 例如,以下命令将当前工作位置设置为 Windows 驱动器的 C: 目录: PowerShell 复制 Set-Location C:\Windows 设置当前工作位置后,仍可通过在命令中包含驱动器名称(后跟冒号)来访问来自其他驱动器的项,...
Set-LocationHKLM:\SOFTWAREPush-Location.\MicrosoftGet-Location Output Path --- HKLM:\SOFTWARE\Microsoft 添加新的 PowerShell 驱动器 可以通过使用New-PSDrive命令添加自己的 PowerShell 驱动器。 若要获取New-PSDrive命令的语法,请使用Get-Command参数输入Get-Command命令: Power...
theGet-Locationcmdlet returns an object. This might not be a surprise because everything in Windows PowerShell is an object. And just like most other objects, it returns default information. But there is also additional information available. As shown here, when I typeGet-Location, by defaul...
4、get-location,简称gl,相当于Linux里的pwd,这里也可以用pwd(print working directory) 5、set-location,简称sl,相当于linux里的cd命令,这里cd也可以用,但是powershell跟cmd下不一样,powershell里的cd命令不需要加/d参数,加上就报错,cmd里的cd命令最好规规矩矩加上/d命令,切记 ...
Microsoft Azure Powershell 获取Azure-Location 首先要切换至AzureResourceManager模式下 http://www.cnblogs.com/SignalTips/p/4110790.html 国际版Get-AzureLocation PS C:\WINDOWS\system32> Get-AzureLocation DisplayName : North Europe Name : North Europe...
若要将某个位置堆栈设为当前位置堆栈,请使用Set-Location的StackName参数。 未命名的默认位置堆栈仅在其是当前位置堆栈时处于完全可访问状态。 如果使命名位置堆栈成为当前位置堆栈,则不能再使用Push-Location或Pop-Locationcmdlet 添加或获取默认堆栈中的项,或者使用Get-Locationcmdlet 显示未命名堆栈中的位...
第二个示例使用Set-Location导航到 SQL Server 提供程序的路径。 从该位置开始,无需使用 Path 参数来获取特定于提供程序的帮助Get-Help。 PowerShell Get-HelpGet-Item-PathSQLSERVER:\DataCollection NAMEGet-ItemSYNOPSIS Gets a collection of Server objectsforthe local computer and any computers to which you ...
第一個範例會使用 Get-HelpPath 參數來指定 SQL Server 提供者的路徑。因為指定了提供者的路徑,因此您可以從任何路徑位置執行命令。 第二個範例會使用 Set-Location 流覽至 SQL Server 提供者的路徑。 不需要 Get-Help 參數即可從該位置取得提供者特定的說明。 PowerShell 複製 Get-Help Get-Item -Path SQLSE...