RJSN

Switch from Local to Temporary

Jun 27th, 2014
401
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $USERSID = ([Security.Principal.WindowsIdentity]::GetCurrent()).User.Value
  2. [Environment]::SetEnvironmentVariable('USERSID', ($USERSID), 'User')
  3.  
  4. Set-ItemProperty -path Registry::'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\'$USERSID'\' -Name State -Value 128
RAW Paste Data