Search Wiki:

PowerShellTunnel - How to Install


Requirements

To use PowerShellTunnel.dll you need:
  1. .NET 3.0 because PowerShellTunnel uses WCF.
  2. PowerShell 1.0 or 2.0.
  3. Run the following PowerShell commands with admin access in the same folder as PowerShellTunnel.dll. Be sure to change the settings in this script according to your needs - especially $user and the host mask(s).

Step 1) Install the PowerShell snap-in.


This allows a PowerShell console to use the snap-in by calling Add-PSSnapin PowerShellTunnel. Refer to SnapIn.cs or PowerShellTunnel Reference to see what cmdlets are installed.

set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil.exe
installutil PowerShellTunnel.dll

Step 2) For the default WCF http connection, for each host address, we need to add http permissions to the address for each user which will be used to host a tunnel (unless you are logged in as an admin):


Note: the following command syntax works on Vista, not sure about XP.
$user = "\Everyone" # You should change this to "MACHINENAME\username"
$hostmasklist = "http://+:8000/PowerShellTunnel/Host1", "http://+:8000/PowerShellTunnel/Host2" #,...
$hostmasklist | foreach-object { netsh http add urlacl url="$_" user=$user } 
Note, to view existing permissions: "netsh http show urlacl".
To remove permissions, run: $hostmasklist | foreach-object { netsh http delete urlacl url="$_" }

Step 3) Work through PowerShellTunnel How to Build.

Last edited Mar 3 2008 at 4:04 AM  by MatHobbs, version 11
Comments
marcoshaw wrote  Mar 14 2008 at 8:26 PM  
Step #2: I have XP, and don't have a netsh http command/context. I'm logged in as admin. I completely bypassed this step, and it appears everything worked OK.

Updating...
Page view tracker