-Examples [-Functionality <System.String[]>] [-Path <System.String>] [-Role <System.String[]>] [<CommonParameters>] Get-Help [[-Name] <System.String>] [-Category {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter | ExternalScript ...
-Examples [-Functionality <System.String[]>] [-Path <System.String>] [-Role <System.String[]>] [<CommonParameters>] Get-Help [[-Name] <System.String>] [-Category {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter | ExternalScript ...
$pwd=ConvertTo-SecureString-String"Admin_123456"-Force-AsPlainText Get-ChildItem-Path'Cert:\CurrentUser\My'|Where-Object{$_.Subject-match"mylab.wang.io"}|Export-PfxCertificate-FilePathC:\Users\Administrator\Desktop\cert\mylab.wang.io.pfx-Password $pwd Get-ChildItem-Path Cert:\CurrentUser\My\|...
C 17.89 11.41 FileSystem C:\ cert Certificate \ D 7.01 22.29 FileSystem D:\ E 35.61 22.98 FileSystem E:\ Env Environment F 26.06 32.54 FileSystem F:\ Function Function G 14.95 33.88 FileSystem G:\ H 31.67 17.15 FileSystem H:\ HKCU Registry HKEY_CURRENT_USER HKLM Registry HKEY_LOCAL_M...
Name Provider Root CurrentLocation --- --- --- --- A FileSystem A:\ C FileSystem C:\ ...nd Settings\PowerUser D FileSystem D:\ 若要查看表示注册表配置单元的 PowerShell 驱动器,请使用 PSProvider 参数来仅显示 PowerShell Registry 提供程序支持的 PowerShell 驱动器: PowerShell Get-PSDrive...
例如,以下命令从 $s会话中的本地计算机运行 CurrentUserCurrentHost 配置文件。 复制 Invoke-Command -Session $s -FilePath $PROFILE 以下命令从 $s会话中的远程计算机运行 CurrentUserCurrentHost 配置文件。 由于未填充 $PROFILE 变量,因此该命令使用配置文件的显式路径。 PowerShell 复制 Invoke-Command -Sess...
Invoke-Command-Session$s-FilePath$PROFILE 以下命令从$s会话中的远程计算机运行“当前用户、当前主机”配置文件。 由于未填充$PROFILE变量,因此该命令使用配置文件的显式路径。 我们使用点溯源运算符,以便配置文件在远程计算机上的当前范围内执行,而不是在其自己的范围内执行。
At line:1 char:23 + $a | Move-ItemProperty <<< -Path HKLM:\Software\MyCompany\design -Name p 若要调查,请使用 Trace-Command cmdlet 跟踪 PowerShell 的参数绑定组件。 以下示例在执行管道时跟踪参数绑定。 PSHost 参数在控制台中显示跟踪结果,FilePath 参数将跟踪结果发送到 debug.txt 文件以供以后...
对于计划作业,DefinitionPath参数的值是$HOME\AppData\Local\Windows\PowerShell\ScheduledJob。 此参数是在 PowerShell 3.0 中引入的。 类型:String Position:1 默认值:None 必需:False 接受管道输入:False 接受通配符:False -FilePath 指定一个本地脚本由Start-Job作为后台作业运行。 输入脚本的路径和文件名,或使用...
-KeyFilePath 指定安全外壳(SSH)用于对远程计算机上的用户进行身份验证的密钥文件路径。 SSH 允许通过私钥/公钥执行用户身份验证,作为基本密码身份验证的替代方法。 如果远程计算机配置为进行密钥身份验证,则可以使用此参数提供标识用户的密钥。 此参数是在 PowerShell 6.0 中引入的。