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 Enter-AzurePSSession { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true)] | |
[string] $ServiceName, | |
[Parameter(Mandatory = $true)] | |
[string] $VMName | |
) | |
$SessionOption = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck; | |
$WinRMUri = Get-AzureWinRMUri -ServiceName $ServiceName -Name $VMName; |
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
$VMList = Get-AzureVM; | |
foreach ($VM in $VMList) { | |
Start-Job -ScriptBlock { | |
Write-Output -Message ('Stopping VM {0} {1}' -f $args[0].ServiceName, $args[0].Name); | |
Stop-AzureVM -ServiceName $args[0].ServiceName -Name $args[0].Name -Force; | |
} -ArgumentList $VM; | |
} |
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 azrdp { | |
<# | |
.Author | |
Trevor Sullivan <pcgeek86@gmail.com> | |
.Description | |
Invoke a RDP session to an Azure Virtual Machine, without having to type the | |
Cloud Service name or Virtual Machine name. | |
.Outputs |
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
### Find the required properties for a particular DSC resource | |
(Get-DscResource | Out-GridView -PassThru).Properties; |
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
<# | |
.Author | |
Trevor Sullivan <pcgeek86@gmail.com> | |
.Links | |
http://trevorsullivan.net | |
http://twitter.com/pcgeek86 | |
.Description | |
This PowerShell script uses the Microsoft Azure PowerShell module along with PowerShell |
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
class Person { | |
[ValidateNotNullOrEmpty()] | |
[string] $FirstName; | |
[ValidateNotNullOrEmpty()] | |
[string] $LastName; | |
[string] $Address; | |
Person([string] $First, [string] $Last) { | |
$this.FirstName = $First; |
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 Prompt { | |
<# | |
.Notes | |
Author: Trevor Sullivan | |
Website: https://trevorsullivan.net | |
Twitter: https://twitter.com/pcgeek86 | |
#> | |
$ATAT = @' | |
____==========_______ | |
_--____ | | "" " "| \ |
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
#!/bin/bash | |
### Visit http://ui.dev.voluminous.io/user-tokens to get a user token | |
### NOTE: This file should contain a function definition called 'fli' | |
source ~/.bash-fli | |
set -e | |
shopt -s expand_aliases |
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
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source) | |
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git | |
2. If your local GIT repo is already set up, skips steps 2 and 3 | |
3. Locally, at the root directory of your source, git init | |
4. Locally, add and commit what you want in your initial repo (for everything, | |
git add . |
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
FROM microsoft/windowsservercore | |
MAINTAINER Trevor Sullivan <tsulli@amazon.com> | |
SHELL ["powershell", "-Command"] | |
ENV PYTHON_DOWNLOAD https://www.python.org/ftp/python/3.6.3/python-3.6.3-amd64.exe | |
ENV PYTHON_FILE python-3.6.3-amd64.exe | |
COPY Install-Boto3.py c:/Amazon/ |