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 Hyper-V | |
Function Update-VMNote { | |
<# | |
.Synopsis | |
Update the Hyper-V VM Note with system information. | |
.Description | |
This command is designed to update a Hyper-V virtual machine note, for machines running Windows on a publically accessible network, with host information like this: |
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
<# | |
1 = QUARTER NOTE | |
1.25 = QUARTER AND HALF | |
.5 = EIGHTH NOTE | |
.25 = SIXTEENTH NOTE | |
2 = HALF NOTE | |
#> | |
#<duration><note>[<octave>] |
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 5.1 | |
Function Start-PSNap { | |
<# | |
.SYNOPSIS | |
Start a PowerShell napping session. | |
.DESCRIPTION | |
Use this command to start a short napping session. The command will alert you when you nap is up with a chime and a message. You have an option of displaying the message on the screen or having it spoken. |
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 function has no provision for alternate credentials unless you run | |
it with Invoke-Command in a PSSession. | |
#> | |
Function Get-LocalUser { | |
<# |
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 | |
#https://gist.github.com/jdhitsolutions/f0415db6bc8dc6236fb3 | |
<# | |
A PowerShell workflow to download Sysinternals tools from web to a local folder. | |
Last updated: February 15, 2016 | |
version : 2.1 |
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 | |
Function Get-LocalGroupMember { | |
<# | |
.SYNOPSIS | |
Get local group membership using ADSI. | |
.DESCRIPTION | |
This command uses ADSI to connect to a server and enumerate the members of a local group. By default it will retrieve members of the local Administrators group. |
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 | |
Function Get-LocalGroupMember { | |
<# | |
.SYNOPSIS | |
Get local group membership using ADSI. | |
.DESCRIPTION |
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
#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
#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. |