Skip to content

Instantly share code, notes, and snippets.

View lidopaglia's full-sized avatar

Lido Paglia lidopaglia

View GitHub Profile
@lidopaglia
lidopaglia / Connect-RDP.ps1
Created July 2, 2014 15:49
Connect to one or more hosts via RDP
<#
This Gist was created by ISEGist
07/02/2014 11:49:27
#>
#requires -Version 4.0
<#
.SYNOPSIS
Make an RDP connection.
@lidopaglia
lidopaglia / open-ps-here.reg
Created September 20, 2014 15:10
Adds 'Open PowerShell window here' via ConEmu to the Windows Explorer context menu (shift+right click).
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"
[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
# 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)
@lidopaglia
lidopaglia / Azure-To-RoyalTS.ps1
Created November 12, 2015 21:09 — forked from tekmaven/Azure-To-RoyalTS.ps1
RoyalTS Document Builder for Azure Virtual Machines
#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,
# 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
@lidopaglia
lidopaglia / Get-AVStatus.ps1
Created July 26, 2016 16:10 — forked from jdhitsolutions/Get-AVStatus.ps1
This PowerShell function uses WMI via the Get-CimInstance command to query the state of installed anti-virus products.
#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
@lidopaglia
lidopaglia / Set-ADSearchBase-Intellisense.ps1
Created July 27, 2016 20:22 — forked from irwins/Set-ADSearchBase-Intellisense.ps1
Create Custom Intellisense for AD cmdlets with SearchBase parameter using TabExpansion++ Module
<#
Author: I.C.A. Strachan
Version:
Version History:
Purpose: Custom Intellisense completion for AD cmdlets with SearchBase parameter
ActiveDirectory & TabExpansion++ module is required.

Keybase proof

I hereby claim:

  • I am lidopaglia on github.
  • I am lidopaglia (https://keybase.io/lidopaglia) on keybase.
  • I have a public key whose fingerprint is 1AB0 CD4C D566 07B1 8B85 784E 889E 1BBD 2986 FF6D

To claim this, I am signing this object:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<array>
<dict>
<key>AudioList</key>
<array>
<dict>
<key>AudioBitrate</key>
<string>160</string>