This file contains hidden or 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
| <# | |
| Display a randomly selected holiday quote in a festive color scheme | |
| you can find more Christmas quotes at | |
| http://www.brainyquote.com/quotes/topics/topic_christmas.html | |
| Learn more about PowerShell: | |
| http://jdhitsolutions.com/blog/essential-powershell-resources/ | |
| #> |
This file contains hidden or 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
| #this must be run in the PowerShell console NOT the ISE | |
| if ($host.name -ne 'ConsoleHost') { | |
| Write-Warning "Sorry. This must be run in the PowerShell console." | |
| #bail out | |
| Return | |
| } | |
| #get window dimensions | |
| $X = $host.ui.RawUI.WindowSize.width |
This file contains hidden or 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
| #edited for clarity. | |
| function prompt { | |
| $message = "$([char]9827) Éirinn go Brách $([char]9827) " | |
| write-host $message -ForegroundColor green -NoNewline | |
| "$((Get-Location).Path)>" | |
| } |
This file contains hidden or 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 Update-OLWLinkGlossary { | |
| <# | |
| .Synopsis | |
| Update Open Live Writer Automatic Links | |
| .Description | |
| This command is designed to make it easier to update and add automatic links to Open Live Writer. It has primarily been written to make it easier to create automatic links for PowerShell commands but you should be able to use it for other items as well. | |
| The command will try to find a matching entry by the Text and if found, will update with the specified values. Be aware that the text you use is case sensitive. Otherwise, the command will create a new entry. |
This file contains hidden or 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
| #requires -version 4.0 | |
| #requires -module ISE | |
| <# | |
| use this function in the PowerShell ISE to change location | |
| to the directory of the currently selected file. | |
| Learn more about PowerShell: | |
| http://jdhitsolutions.com/blog/essential-powershell-resources/ | |
| #> |
This file contains hidden or 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
| #add an ISE shortcut to select the current line | |
| #put this in your ISE profile script | |
| <# | |
| Microsoft.PowerShell.Host.ISE.ISEMenuItem Add( | |
| string displayName, | |
| scriptblock action, | |
| System.Windows.Input.KeyGesture shortcut | |
| ) |
This file contains hidden or 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
| #requires -version 3.0 | |
| <# | |
| This command will attempt to execute a very simple scriptblock remotely using Invoke-Command. If the command fails | |
| then PowerShell remoting is not properly enabled or configured. | |
| #> | |
| Function Test-PSRemoting { | |
| [cmdletbinding()] | |
| Param( |
This file contains hidden or 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
| #requires -version 4.0 | |
| <# | |
| Display a random Git tip of the day to the console. | |
| This script does not write anything to the pipeline. | |
| You will need to clone or download the git-tips project locally | |
| from https://github.com/git-tips | |
| This script is described at http://bit.ly/1OgpK7O |
This file contains hidden or 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
| #requires -version 3.0 | |
| Function Get-EventLogFile { | |
| <# | |
| .SYNOPSIS | |
| Get information about classic event logs | |
| .DESCRIPTION | |
| This command will use the CIM cmdlets to gather information about event log files. The default is to display all classic style event logs or you can select a specific one by name. |
This file contains hidden or 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 Get-ISEMRU { | |
| [cmdletbinding()] | |
| Param() | |
| <# | |
| Path will be something like: | |
| C:\Users\Jeff\AppData\Local\microsoft_corporation\powershell_ise.exe_StrongName_lw2v2vm3wmtzzpebq33gybmeoxukb04w | |
| #> | |
| $ISEPath = "$env:localappdata\microsoft_corporation\powershell_ise*\3.0.0.0" |
OlderNewer