Tag Archives: function

Function to invoke PowerShell ISE from shell

Another little function to add to your PowerShell profile. If you’re in the PowerShell Integrated Scripting Environment you can use the command psedit <filename> to open the file in the ISE editor – and it doesn’t just have to be … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , | Leave a comment

Powershell function to pin and unpin from Windows Taskbar

Wrote this to make it easy to add and remove pinned items from the taskbar. Code function Pin-Taskbar([string]$Item = “”,[string]$Action = “”){ if($Item -eq “”){ Write-Error -Message “You need to specify an item” -ErrorAction Stop } if($Action -eq “”){ Write-Error … Continue reading

Rate this:

Posted in Applications, PowerShell, Scripting, Windows | Tagged , , , , , , , | 3 Comments

VBScript function to get folder owner

This VBScript function parses the output of the DIR /Q command to find the owner of the specified folder. It demonstrates using a WScript.Shell Exec object to capture the output from a command, then searching within the output for certain … Continue reading

Rate this:

Posted in Scripting, Windows | Tagged , , , | Leave a comment

VBScript: InStr with Regular Expression function

I don’t think there’s a built-in way to do an InStr with a regular expression as the search string in VBScript, so I wrote one: Function inStrRegExp(sString, sPattern, bIgnoreCase) Dim oRegExp,aMatches, item, bFound, iPosition Set oRegExp = New RegExp ¬†oRegExp.IgnoreCase … Continue reading

Rate this:

Posted in Scripting | Tagged , , , , , | Leave a comment