Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-RequiredVersion <String>] [-AllVersions] [-IncludeDependencies] [-Filter <String>] [-Tag <String[]>] [-Includes <String[]>] [-Command <String[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredenti...
$PSScriptRoot 包含要从中执行脚本模块的目录。 通过此变量,脚本可以使用模块路径来访问其他资源。 $PsUICulture 包含操作系统中当前所用的用户界面 (UI) 区域性的名称。UI 区域性确定哪些文本字符串用于用户 界面元素(如菜单和消息)。这是系统的 System.Globalization.CultureInfo.CurrentUICulture.Name 属性的值。 $Ps...
模組: PowerShellGet 儲存腳本。 語法PowerShell 複製 Save-Script [-Name] <String[]> [-MinimumVersion <String>] [-MaximumVersion <String>] [-RequiredVersion <String>] [-Repository <String[]>] [-Path] <String> [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential <PSCredential>]...
PS C:\Users>get-cultureLCID Name DisplayName --- --- ---1033en-USEnglish (United States) PS C:\Users>Get-ExecutionPolicyAllSigned PS C:\Users>Get-WinSystemLocaleLCID Name DisplayName --- --- ---1033en-USEnglish (United States) 在同一台计算机上,创建一个 ...
ScriptFileInfo-PathD:\ScriptSharingDemo\Demo-Script.ps1 Version Name Author Description --- --- --- ---1.0Demo-Scriptauthor@contoso.com my test script file description goes herePublish-Script-PathD:\ScriptSharingDemo\Demo-Script.ps1-RepositoryLocalRepo1Find-Script-RepositoryLocalRepo1-Name"...
.\Get-ServiceLog.ps1 -ServiceName WinRM 作為安全性功能,當您按兩下 檔案總管中的腳本圖示,或當您輸入文本名稱時,即使腳本位於目前目錄中,也不會執行腳本。 如需在PowerShell中執行命令和腳本的詳細資訊,請參閱 about_Command_Precedence。 用PowerShell 執行 從PowerShell 3.0 開始,您可以從 檔案總管 執行腳...
.\Get-ServiceLog.ps1 -ServiceName WinRM 作為安全性功能,當您按兩下 檔案總管中的腳本圖示,或當您輸入文本名稱時,即使腳本位於目前目錄中,也不會執行腳本。 如需在PowerShell中執行命令和腳本的詳細資訊,請參閱 about_Command_Precedence。 用PowerShell 執行 從PowerShell 3.0 開始,您可以從 檔案總管 執行腳...
Length;$i++){ "`$iparray["+$i+"]="+$iparray[$i]+"`n" Invoke-Command -ComputerName $iparray[$i] -Credential $Cred -ScriptBlock { Get-WindowsFeature -Name NET-*, Web-* | where {$_.Name -notmatch "Ftp|Web-Application-Proxy"} | Install-WindowsFeature; } }...
-- ExternalScript:位于Path环境变量 ($env:path) 所列路径中的全部 .ps1 文件。 -- Filter and Function:所有 Windows PowerShell 函数。 -- Script:当前会话中的脚本块。 是否必需? False 位置? named 默认值 是否接受管道输入? true(ByPropertyName)是否接受通配符? False ...
Get-Help-NameC:\PS-Test\MyScript.ps1 参数 -Category 只显示指定类别及其别名中的项的帮助。 概念文章位于HelpFile类别中。 此参数的可接受值如下所示: 别名 Cmdlet 供应商 常规 常见问题 词汇表 HelpFile ScriptCommand 功能 滤波器 ExternalScript