/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" Setting the Path / system variables from MSH "," Obfuscated Monad Script "," Get Binary SID in MSH (Share Security Update) "," Replace Security on existing share using MSH "," Einstein "," Runas with loading Profile script in MSH "," do the MSH - CMD- MSH loop. & RunAs in MSH "," list processes of remote computer from MSH "," MSH Error message line number and Trap. "," Strange behavour of get-member on DataTables "," ")

Thursday, November 03, 2005

 


Create System Variable From MSH



I found a work-around :

(I almost give te solution in the last post Setting the Path / system variables from MSH )
first create the Key, then Set it using WMI (so it gets updated ;-).

new-property -Path "HKLM:\System\CurrentControlSet\Control\Session manager\Environment" -Property New -Type string -Value "foo"
$env = get-WMIObject win32_environment -filter "Name = 'New'"
$env.VariableValue = $env.VariableValue + "Val"

gr /\/\o\/\/


Comments: Post a Comment



<< Home

Archives

October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Google
 
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?