Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Modifying Management Information with WinRM Set in PowerShell

In this article, we will explore how to modify management information using the WinRM Set command in PowerShell. This topic is important for Windows users as it allows them to make changes to the configuration and settings of remote Windows systems using PowerShell.

WinRM (Windows Remote Management) is a powerful Windows feature that enables remote management of Windows-based systems. It allows administrators to execute commands, run scripts, and access management information from a remote computer. The WinRM Set command is a useful tool for modifying various aspects of remote systems, such as network settings, security configurations, and service configurations.

To use the WinRM Set command in PowerShell, follow these steps:

  1. Open PowerShell with administrative privileges.

  2. Run the following command to enable WinRM on the local computer:

    Enable-PSRemoting -Force
  3. To modify a specific setting on a remote computer, use the following command:

    Set-Item WSMan:\localhost\Setting -Value "NewValue"

    Replace "Setting" with the name of the setting you want to modify, and "NewValue" with the new value you want to set.

  4. To modify a setting on multiple remote computers, use the following command:

    Invoke-Command -ComputerName "Computer1", "Computer2" -ScriptBlock { Set-Item WSMan:\localhost\Setting -Value "NewValue" }

    Replace "Computer1" and "Computer2" with the names or IP addresses of the remote computers you want to modify.

  5. Verify the changes by running the following command:

    Get-Item WSMan:\localhost\Setting

    This command will display the current value of the modified setting.

By using the WinRM Set command in PowerShell, Windows users can easily modify management information on remote systems without the need for manual intervention. This saves time and effort, especially when managing multiple Windows-based systems.

Examples:

Example 1: Modifying the maximum number of simultaneous connections on a remote computer.

Set-Item WSMan:\localhost\MaxConcurrentUsers -Value 100

Example 2: Modifying the timeout value for WinRM operations on a remote computer.

Set-Item WSMan:\localhost\MaxTimeoutms -Value 60000

Example 3: Modifying the maximum memory per shell for PowerShell sessions on a remote computer.

Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxMemoryPerShellMB -Value 512

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.