Remote file explorer PowerPack using PowerShell 2.0 remoting

by Ravikanth on February 21, 2010

I’ve published a free book on PowerShell 2.0 remoting. You can download it at:

I just realesed my second powerpack for PowerGUI — A remote file explorer. This one uses PowerShell 2.0 remoting to enable remote drive browsing and file transfers. For performing file transfers, I am using pModem module developed by @oising. At present, this module supports file transfers from a remote session only. So as this PowerPack.

Requirements

1. PowerGUI 2.0 or later
2. PowerShell 2.0
3. pModem 0.5 or later pModem download: http://www.nivot.org/2009/11/02/PowerShell20IntroducingThePModemFileTransferProtocol.aspx
Make sure you copy this module to all remote computer to the $ENV:PSModulePath
4. You need to run PowerGUI with elevated privileges

Getting Started

  1. Enable PS remoting on computers by using Enable-PSRemoting. For guidance on how to do this in a workgroup environment check http://www.ravichaganti.com/blog/?p=1060
  2. Check PS remoting on each computer by using Enter-PSSession -ComputerName Localhost
  3. Install this powerpack
  4. Add remote computers using “Add remoting Computers” Option in actions

Make sure you check PowerShell libraries in the admin console’s file menu to see if pmodem is enabled or not.

PowerGUI pModem module

PowerGUI pModem module

Adding a remoting computer

You can add a remote computer by using the “Add remoting computer” action. This list of computers is saved at $Host.PrivateData.UserAppData)\FileExplorer.powerpack.xml. I have localhost listed there by default. This is to enable file transfers from local session to remote computer.

Add remoting Computer

Add remoting computer

Transferring a remote file

At present, this powerpack supports only transferring files and from a remote computer only. You can do that by selecting a file from the result grid and clicking on “Get Remote File” action.

Get remote file

Get remote file

How is this done?

All the file browing happens over PowerShell remoting sessions. I am using Get-PSdrive to get all PS Drives of type filesystem and then use Get-ChildItem cmdlet to get files/folders from a remote drive.

Known issues

  1. This is a proof-of-concept implementation. So, there will be bugs
  2. Again, you cannot transfer files from local computer to remote session. This is not implemented.
  3. Currently only files can be transferred. No recursive folder transfers possible.

Ravikanth

A technology enthu and a Windows PowerShell MVP working on SharePoint solutions at Dell Inc. Has deep interests in Windows Server OS & Virtualization.

More Posts - Website - Twitter - Facebook

Previous post:

Next post: