# 在远程计算机上获取注册表项Invoke-Command-ComputerName"RemoteComputer"-ScriptBlock{Get-ItemProperty-Path"HKLM:\Software\MyApp"}# 在远程计算机上设置注册表值Invoke-Command-ComputerName"RemoteComputer"-ScriptBlock{Set-ItemProperty-Path"HKLM:\Software\MyApp"-Name"Setting"-Value"NewValue"} 29. 安全性和权...
# 获取操作系统信息Get-WmiObject-ClassWin32_OperatingSystem# 获取网络适配器信息Get-WmiObject-ClassWin32_NetworkAdapterConfiguration |Where-Object{$_.IPAddress-ne$null}# 获取逻辑磁盘信息Get-WmiObject-ClassWin32_LogicalDisk |Select-ObjectDeviceID, FreeSpace, Size 5. 其他注意事项 可以通过-ComputerName参数...
Invoke-Command -ComputerName Server01, Server02 -ScriptBlock {Get-Process} # - OR - Invoke-Command -Session $s -ScriptBlock {Get-Process} 若要中断远程命令,请键入 CTRL+C。 中断请求将传递到远程计算机,也就是终止远程命令的位置。 有关远程命令的详细信息,请参阅 about_Remote 和支持远程处理的 ...
Example Code: Invoke-Command-Computer RemoteComputer01 {Get-ItemPropertyHKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\run}
从 Windows PowerShell 5.0 开始,可运行 Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine -Name ApplicationBase。 Windows PowerShell 控制台现在使用语法着色,就像 Windows PowerShell ISE 中一样。 新的NetworkSwitch 模块包括的 cmdlet 使你能够将交换机、虚拟 LAN (VLAN) 和...
新的Get-ItemPropertyValue Cmdlet 讓您不需使用點標記法,即可取得屬性值。 例如,在舊版的 Windows PowerShell 中,您可以執行下列命令來取得 PowerShellEngine 登錄機碼的 Application Base 屬性值:(Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine -Name ApplicationBase...
Checkpoint-Computer 僅限Windows Clear-Content Clear-EventLog 僅限Windows Clear-Item Clear-ItemProperty Clear-RecycleBin 僅限Windows Complete-Transaction 僅限Windows Convert-Path Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore 僅限Windows Enable-ComputerRestore 僅限Windows Get-Chil...
Get-ItemProperty Get-ItemProperty on Remote Server Get-Mailbox filter on database with -notlike get-mailbox recipient type get-module not listing out failoverclusters module when CreateProcess() or system() called Get-MsolRoleMember : Cannot convert 'System.Object[]' to the type 'System.Guid...
Add-ComputerAdd-ContentClear-Content Clear-ItemClear-ItemPropertyConnect-WSMan Copy-ItemCopy-ItemPropertyEnter-PSSession Get-ContentGet-CredentialGet-HotFix Get-ItemGet-ItemPropertyGet-WinEvent Get-WmiObjectGet-WSManInstanceInvoke-Command Invoke-ItemInvoke-WmiMethodInvoke-WSManAction ...
Creates a new event log and a new event source on a local or remote computer. New-Item Creates a new item. New-ItemProperty Creates a new property for an item and sets its value. For example, you can use New-ItemProperty to create and change registry values and data, which are properti...