Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Change Registery Value Remotely using Set-item

$
0
0

Hello All,

I am trying to modify a single registery value remotely on multiple servers. Below is the script I am trying, I am new to powershell so not able to find out whats wrong I am doing as its just able to modify the registry locally but not remotly on other servers. Can some one please help me to make the modifications in order to work it remotely.

 

Script :

$ServerName = Import-Csv -Path "C:\temp\servers.csv" | Select-Object -ExpandProperty "Hostname"
 
foreach ($Server in $ServerName) {
 
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl -Name CrashDumpEnabled -Value 3
}


Viewing all articles
Browse latest Browse all 6937

Trending Articles