View ChristmasWishes.ps1
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
<# | |
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/ | |
#> |
View Get-Confetti.ps1
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
#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 |
View StPatPrompt.ps1
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
#edited for clarity. | |
function prompt { | |
$message = "$([char]9827) Éirinn go Brách $([char]9827) " | |
write-host $message -ForegroundColor green -NoNewline | |
"$((Get-Location).Path)>" | |
} |
View Update-OLWLinkGlossary
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 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. |
View Set-ISELocation.ps1
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
#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/ | |
#> |
View Add-ISESelectLineShortcut.ps1
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
#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 | |
) |
View Test-PSRemoting.ps1
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
#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( |
View ConvertTo-HTMLListing.ps1
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
#requires -version 3.0 | |
Function ConvertTo-HTMLListing { | |
<# | |
.Synopsis | |
Convert text file to HTML listing | |
.Description | |
This command will take the contents of a text file and create an HTML document complete with line numbers. The command does not create an actual file. You would need to pipe to Out-File. See examples. | |
There are options to suppress the line numbers and to skip any blank lines. The command is intended to convert one file at a time although you can pipe a file name to the command. |
View Show-GitTip.ps1
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
#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 |
View Get-EventLogFile.ps1
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
#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. |
OlderNewer