Grab our RSS feeds Follow us on Twitter Join our Facebook Group Connect with us on LinkedIn
myITforum.com, Powered by You.
you are not logged in

Articles

Newslinks

Links

Downloads

Site Services

Community Forums

Discussion Lists

Article Search

Newsletter

Web Blogs

FAQs

Live Support

myITforum TV

Take a Poll

Monthly Drawing

myITforum Network

User Group Directory

Our Partners

About Us

Register

Login

BRONZE PARTNER:

BRONZE PARTNER:



Industry News:




  Home : Articles : Windows PowerShell print | email | | Forums |   print | email | | Blogs |   print | email | | Wiki |   print | email | | FAQs |   print | email | Article Search  
Powershell Script to create new registry key value on remote computers


Bookmark and Share

By: Ying Li
Posted On: 1/14/2009

In this post, I explore the ways to get remote registry key property. Here is a PowerShell script to create a new registry key value in remote registry.

This article was Previously posted on Ying Li's Blog

$colComputers = gc c:\myworkspace\computerlist.txt

foreach ($strComputer in $colComputers)

{

#Open remote registry

$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $strComputer)

#Open the targeted remote registry key/subkey for read and write ($True)

$regKey= $reg.OpenSubKey("SOFTWARE\\Whatever\\General",$True)

#Create a new (string)value –“Override System Verification” and assign “Yes” to it

$regKey.Setvalue('Override System Verification', 'Yes', 'String')

  myITforum.com ©2010 | Legal | Privacy