Solved

Powershell to copy and execute a .reg file across multiple servers

Posted on 2010-09-10
1
1,906 Views
Last Modified: 2012-08-13
Good Morning,

I am in the need of a powershell script that will add or run a specific reg key which I have exported if it helps here is the key:
-----
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\IniFileMapping\Autorun.inf]
@="@SYS:DoesNotExist"


[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\amsint32]
-----
I would like the powershell script to access a full list of servers and run this across all of them. Is there an easy way to get this done? at this point I will take any recommendations.

Thanks,
Dave
0
Comment
Question by:Betex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
petelettin earned 500 total points
ID: 33652763
you can use (presuming the key exists)

new-itemproperty -path "hklm:\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\IniFileMapping\Autorun.inf\" -name "@" -propertytype string -value "@SYS:DoesNotExist"

for remote registry download from MSDN http://code.msdn.microsoft.com/PSRemoteRegistry 

where servers.txt contains a list of server names

$Key = "hklm:\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\IniFileMapping\Autorun.inf"
Get-Content servers.txt | Set-RegString -hive LocalMachine -Key $Key -Value "@" -Data "@SYS:DoesNotExist" -Force -PassThru
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question