powershellCopy Code # 在远程计算机上获取注册表项 Invoke-Command -ComputerName "RemoteComputer" -ScriptBlock { Get-ItemProperty -Path "HKLM:\Software\MyApp" } # 在远程计算机上设置注册表值 Invoke-Command -ComputerName "RemoteComputer" -
PowerShell.Commands AddContentCommand AddHistoryCommand AddMemberCommand AddTypeCommand AdminPasswordStatus AliasProvider AliasProviderDynamicParameters BaseCsvWritingCommand BaseCsvWritingCommand.QuoteKind BasicHtmlWebResponseObject BootOptionAction BreakpointType ByteCollection CatalogCommandsBase CertificateNotFound...
PowerShell 複製 Invoke-Command -ComputerName Server01 -ScriptBlock { Get-ExecutionPolicy } | Set-ExecutionPolicy Cmdlet Invoke-Command 會在本機計算機上執行,並將 ScriptBlock 傳送至遠端電腦。 ComputerName 參數會指定遠端電腦 Server01。 ScriptBlock 參數會在遠端電腦上執行Get-ExecutionPolicy...
I'm a long-time user of the command shell (Cmd.exe) in Windows. Old habits die hard, so I continually find myself typing the Set command in the Windows PowerShell console when I want to list, set, or clear environment variables. In PowerShell, Set is an alias for the Set-Variable ...
Upgrade App-V Sequenced App Packages Using the Command Line Avoid Using Dynamically Expanding VHD Files in a Production Environment Secure RDS (Remote Desktop Services) Connections with SSL Compare MED-V and App-V and Decide which is Right for You Get a Free Set of PowerShell Commands for Mana...
PowerShell SDK 7.4 搜尋 Microsoft.PowerShell.Commands AddContentCommand AddHistoryCommand AddMemberCommand AddTypeCommand AdminPasswordStatus AliasProvider AliasProviderDynamicParameters BaseCsvWritingCommand BaseCsvWritingCommand.QuoteKind BasicHtmlWebResponseObject BootOptionAction BreakpointType ByteCollection Cat...
PowerShell 复制 PS C:\> Invoke-Command -Computer "Server01" -ScriptBlock {Get-ScheduledJob | Get-ScheduledJobOption | Set-ScheduledJobOption -IdleTimeout 2:00:00}此命令将 IdleTimeout 的值从一小时(默认值)更改为 Server01 计算机上所有计划作业的两小时。
PowerShell Set-RemoteDomainContoso-AllowedOOFTypeNone-DeliveryReportEnabled$false-TNEFEnabled$true This example performs the following actions: It disables out-of-office notifications to the remote domain. It suppresses delivery receipts sent from clients in your organization to the remote domain. ...
The WhatIf switch doesn't work in Security & Compliance PowerShell. The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch. Expand ...
Upgrade App-V Sequenced App Packages Using the Command Line Avoid Using Dynamically Expanding VHD Files in a Production Environment Secure RDS (Remote Desktop Services) Connections with SSL Compare MED-V and App-V and Decide which is Right for You Get a Free Set of PowerShell Commands for Mana...