Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

PS Remoting Question - Not sure what is happening

$
0
0

I wrote the following simple Powershell Script in an attempt to change the Home Page of Internet Explorer (Win 7 64 Bit) on a Remote User with PS Remoting Enabled:

#### CHECK HOMEPAGE REMOTELY
$sb = {Get-ItemProperty "HKCU:\Software\Microsoft\Internet Explorer\Main" -Name "Start Page" | select "start page"}
Invoke-Command -ComputerName PCNAME -ScriptBlock $sb

### Change Homepage Remotely
$HPR = {Set-ItemProperty -Path "HKCU:\Software\Microsoft\Internet Explorer\Main" -Name "Start Page" "http://en.wikipedia.org/wiki/Slacker"}
Invoke-Command -ComputerName PCNAME -ScriptBlock $HPR

### See if Change Took
Invoke-Command -ComputerName PCNAME -ScriptBlock $sb

When I run it it appears as if the script ran correctly.  The new Web Address comes back as expected.

However, when I remote into the PC and run REGEDIT - I don't see any changes and the Internet Page has not changed either when I open IE.  

What gives?  When I run these commands locally on my PC, it works as expected.  


Matt Dillon






Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>