Posts

Showing posts with the label Powershell ISE

CPolydorou.PSISE module updates

Image
The latest release of my Powershell module for PowerShell ISE host contains a new function named "Insert-PSISEQuotes" that updates the text in the current open file. There are many times when I have been given a list of items by email, or I have copied them from another file or event written them line by line. In order to transfer these items to a variable, I usually copy the text in a new text file and then use the Get-Content cmdlet to get the contents of the file and store them in a variable for later use. The "Insert-PSISEQuotes" function will insert double quotes in the start and end of each line in the current file open in ISE followed by a comma and the end of the line. I can also add a variable assignment or just parentheses to make the text an array. Let's take a list of email addresses for example: You can convert the list to an array using the "Array" parameter: The "Variable" parameter will convert the text to an ...

Updates on the CPolydorou.PSISE PowerShell module

The 1.2.1 version of the CPolydorou.PSISE module has just been published and contains updates on two of it's functions. The first function that has been updated is "New-PSISETab". I've added a new parameter called "NoSwitch" that when selected will set the active tab to the tab that the command was executed. This will allow you to keep working on the old tab after creating the new one. The other updated function is "Open-PSISEFile". I have a lot of script files that I'm using as templates that get saved every time I change something and run the script. To avoid changing the files, I've added a parameter called "AsCopy". If this switch is used, a new blank file is added to the PowerShell tab and the content is copied from the file specified in the "Path" parameter. This way, the script can be executed but the file is not updated. You can also open the file on another PowerShell tab by using it's name or it'...

Updates on the CPolydorou.PSISE PowerShell Module

A new function has been added to the CPolydorou.PSISE Powershell module named "Remove-PSISETab. This function allows us to remove a Powershell ISE powershell tab using it's name or number, or just the current tab. NAME     Remove-PSISETab     SYNOPSIS     Remove a powershell tab.     SYNTAX     Remove-PSISETab [-Name] <String> [-Force] [<CommonParameters>]         Remove-PSISETab [-Number] <Int32> [-Force] [<CommonParameters>]         Remove-PSISETab [-Current] [-Force] [<CommonParameters>]     DESCRIPTION     Remove a new powershell tab awithin ISE.     PARAMETERS     -Name <String>         The name of the tab.             -Number <Int32> ...