In version 5.0, PowerShell ISE has got a new feature that lets you edit files on remote computers with a graphical editor. Its main purpose is to open scripts on a server; however, this also works for other text files like logfiles.

Wolfgang Sommergut

Wolfgang Sommergut has over 20 years of experience in IT journalism. He has also worked as a system administrator and as a tech consultant. Today he runs the German publication WindowsPro.de.

To edit a file on a remote computer, you will usually navigate to a network share and load the text into a local editor. Alternatively, you connect via Remote Desktop Protocol (RDP) and use an editor residing on the remote machine.

Interesting option for Nano Server ^

In some cases, these ways are cumbersome or not even possible, for instance, if you have to edit files on a Nano Server. Microsoft's GUI-less operating system doesn't accept remote desktop connections. At least you could access the server's file system through an admin share.

However, PowerShell ISE offers a comfortable alternative with PSEdit. If you are working on a script, you don't have to leave your development environment to edit the file on a remote server.

Starting a remote session via GUI ^

First, you have to open a remote session on the server, which you could do the usual way with the corresponding cmdlets.

Opening a remote session in PowerShell ISE

Opening a remote session in PowerShell ISE

However, it is easier just to click New Remote PowerShell Tab in ISE's File menu. A dialog will then open where you just have to enter the computer name of the remote machine and your credentials.

Connecting to a remote computer

Connecting to a remote computer

Afterwards, you are in the context of the remote computer where you can navigate through the file system with Set-Location and Get-ChildItem. Once you locate your file, you can open it with PSEdit, which also accepts wildcards:

This command would load all PowerShell scripts from the current directory and open each file in a different tab.

The feature is unavailable on older Windows versions. However, if you upgrade to PowerShell 5.1, you will also get the latest PowerShell ISE version.

Win the monthly 4sysops member prize for IT pros

Share
4+

Users who have LIKED this post:

  • avatar
  • avatar

Related Posts

2 Comments
  1. FrankieM 3 months ago

    I would like to point out that you can also open a new PS tab in PSEdit then run:

    This will make the connection with currently logged in user, then you can run the PSEdit .\filename.extension

    This will also open it in the Editor. Less menu hunting this way. Depending on your setup/work flow I believe both are valid.

    3+

    Users who have LIKED this comment:

    • avatar
  2. js2017 1 month ago

    You can start the ise from the command line by typing "ise".

    0

Leave a reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

Please ask IT administration questions in the forum. Any other messages are welcome.

Sending
© 4sysops 2006 - 2017

Log in with your credentials

or    

Forgot your details?

Create Account