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 colorful Christmas countdown prompt | |
[♫♪Christmas in 18.15:22:08֍♦] PS C:\> | |
This should work in the console with a True Type font and | |
the Powershell ISE | |
this prompt requires a TrueType font |
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 prompt counts down to the first day of Hanukkah 2017 | |
<# | |
It appears that some of the special characters I was using aren't supported in Windows 10 unless you are using Raster fonts. | |
[CHAR]14 is supposed to be a musical note and [CHAR]15 is like a snowflake. | |
You can select any other character you want, or none at all. | |
#> | |
Function Prompt { | |
#get current year | |
$year = (Get-Date).year |
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( |
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 | |
Function Out-More { | |
<# | |
.Synopsis | |
Send "pages" of objects to the pipeline. | |
.Description | |
This function is designed to display groups or "pages" of objects to the PowerShell pipeline. It is modeled after the legacy More.com command line utility. | |
By default the command will write out objects out to the pipeline in groups of 50. You will be prompted after each grouping. Pressing M or Enter will get the next group. Pressing A will stop paging and display all of the remaining objects. Pressing N will display the next object. Press Q to stop writing anything else to the pipeline. |
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/ | |
#> |
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 |
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. |
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
#generate a fictious name that might exist in the Star Wars universe. | |
[cmdletbinding()] | |
Param( | |
[Parameter(Mandatory,HelpMessage="Enter your first name. It must be at least 2 characters")] | |
[ValidateNotNullOrEmpty()] | |
[ValidateScript({$_.length -ge 2})] | |
[String]$Name, | |
[Parameter(Mandatory,HelpMessage="Enter your Mother's first name. It must be at least 2 characters")] | |
[ValidateNotNullOrEmpty()] |
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 is a variation of a script posted at | |
https://gallery.technet.microsoft.com/SONOS-PowerShell-500c9878 | |
that uses Invoke-Webrequest. | |
This is very much a work in progress | |
other resources |
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
Verifying that "jeffhicks.id" is my Blockstack ID. https://explorer.blockstack.org/name/jeffhicks.id |
OlderNewer