Posts

Showing posts with the label Insert-PSISEQuotes

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 ...