This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Out-Gridview{ | |
<# | |
.Synopsis | |
Proxy function for Out-Gridview to include parameter -ViewDefault. | |
.Description | |
Adds the parameter -ViewDefault to support Out-ConsoleGridView without impacting existing scripts or current $PSStyle standards. | |
When loaded and called | |
- with parameter -ViewDefault, this will set a hidden file within the profile of current user named .out-gridview.settings | |
- if the file exists, it will check the preferred setting and set a global variable OutGridviewSettings | |
- if the global variable exists, it will use that variable ofr loading settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smartmatch{ | |
param( | |
[string]$inputstring | |
) | |
if ($inputstring -match '\[') { | |
$inputstring = $inputstring.replace("[","\[") | |
} | |
if ($inputstring -match '\]'){ | |
$inputstring = $inputstring.replace("]","\]") | |
} |