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
<# | |
Author: I.C.A. Strachan | |
Version: | |
Version History: | |
Purpose: Custom Intellisense completion for AD cmdlets with SearchBase parameter | |
ActiveDirectory & TabExpansion++ module is required. |
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-AVStatus { | |
<# | |
.Synopsis | |
Get anti-virus product information | |
.Description | |
This command uses WMI via the Get-CimInstance command to query the state of installed anti-virus products. The default behavior is to only display enabled products, unless you use -All. You can query by computername or existing CIMSessions. | |
.Example |
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
# Gets a list of open cards in a Trello board, selects a | |
# random one, and posts to slack as a lunch recommendation. | |
Import-Module SlackPS | |
# Slack | |
$slack_uri='<your_webhook_uri_here>' | |
$slack_channel = '<your_channel_here>' | |
# Trello |
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
#Auth to your azure account | |
Add-AzureAccount | |
Import-Module 'C:\Program Files (x86)\code4ward.net\Royal TS V3\RoyalDocument.PowerShell.dll' -Force | |
function CreateRoyalFolderHierarchy() | |
{ | |
param( | |
[string]$folderStructure, | |
[string]$splitter, |
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
# Import the module | |
$RTSPSModule = Join-Path -Path ${env:ProgramFiles(x86)} -ChildPath 'code4ward.net\Royal TS V3\RoyalDocument.PowerShell.dll' | |
Import-Module $RTSPSModule | |
# Explore available cmdlets | |
Get-Command -Module RoyalDocument.PowerShell | |
# Create a new RoyalStore in memory | |
$Store = New-RoyalStore -UserName ($env:USERDOMAIN + '\' + $env:USERNAME) |
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] scripts:\> $itunes = New-Object -ComObject itunes.application | |
[2] scripts:\> $itunes.CurrentTrack | |
[3] scripts:\> $itunes.play() | |
[4] scripts:\> $itunes.CurrentTrack | |
Name : (Untitled) | |
Index : 104 | |
sourceID : 72 | |
playlistID : 21271 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell] | |
@="Open PowerShell window here" | |
"Extended"="" | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command] | |
@="\"C:\\Program Files\\ConEmu\\ConEmu64.exe\" /cmd powershell -noexit -command cd '%V'" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell] | |
@="Open PowerShell window here" |
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 Gist was created by ISEGist | |
07/02/2014 11:49:27 | |
#> | |
#requires -Version 4.0 | |
<# | |
.SYNOPSIS | |
Make an RDP connection. |
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 Gist was created by ISEGist | |
05/26/2014 18:42:33 | |
#> | |
function Test-BoundParams | |
{ | |
<# | |
.SYNOPSIS | |
Add a parameter with default value to PSBoundParameters | |
#> |
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 Gist was created by ISEGist | |
04/03/2014 20:11:13 | |
#> | |
# Resize the standard console window | |
function Resize-ConsoleWindow | |
{ | |
## | |
## Author : Roman Kuzmin | |
## Synopsis : Resize console window/buffer using arrow keys |