$ uname -r
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
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
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
# Based on http://nuts4.net/post/automated-download-and-installation-of-visual-studio-extensions-via-powershell | |
param([String] $PackageName) | |
$ErrorActionPreference = "Stop" | |
$baseProtocol = "https:" | |
$baseHostName = "marketplace.visualstudio.com" | |
$Uri = "$($baseProtocol)//$($baseHostName)/items?itemName=$($PackageName)" |
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 -module ScheduledTasks | |
#update PowerShell help via a Scheduled Task | |
$cred = Get-Credential "$env:USERDOMAIN\$env:USERNAME" | |
# for Windows PowerShell | |
# $action = New-ScheduledTaskAction -execute powershell.exe -argument '-noprofile -command "&{Update-Help -force}"' | |
$actionparams = @{ | |
execute = 'pwsh.exe' | |
argument = '-nologo -noprofile -noninteractive -command "&{Update-Help -force}"' |
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
# Download latest dotnet/codeformatter release from github | |
$repo = "dotnet/codeformatter" | |
$file = "CodeFormatter.zip" | |
$releases = "https://api.github.com/repos/$repo/releases" | |
Write-Host Determining latest release | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$tag = (Invoke-WebRequest -Uri $releases -UseBasicParsing | ConvertFrom-Json)[0].tag_name |
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
# Source: https://stackoverflow.com/a/43317244 | |
$path = ".\aws-ec2-key.pem" | |
# Reset to remove explict permissions | |
icacls.exe $path /reset | |
# Give current user explicit read-permission | |
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" | |
# Disable inheritance and remove inherited permissions | |
icacls.exe $path /inheritance:r |
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 Sets up WinRM Remote PowerShell with delegated authentication for an existing trusted SSL cert | |
######################################################################## | |
################ Do this on the Server | |
######################################################################## | |
#Enable WinRM on a VM - with on-demand certificate creation | |
Function RemotePowerShell { | |
$process = 'cmd.exe' | |
$arguments = '/c winrm invoke restore winrm/config @{}' |
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
# Download latest dotnet/codeformatter release from github | |
$repo = "dotnet/codeformatter" | |
$file = "CodeFormatter.zip" | |
$releases = "https://api.github.com/repos/$repo/releases" | |
Write-Host Determining latest release | |
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name |
Exploring management options for an ESXi server in a home/lab environment.
- It's so fucking rad that ESXi free doesn't provide a web interface. /sarcasm
- Having a dedicated Windows VM for ESXi management is suck.
- Running vSphere Client in Wine/Crossover requires hacks to install and doesn't work correctly.
- How much does it cost to get a license for a lab environment?
- Can we use the DCUI (Direct Console User Interface) without a license? (Answer: YES, via a directly console, over SSH, but we can only do very basic things)
- Can we use the CLI/SDK/API tools? (Answer: PARTIALLY, Without a license it's locked down to read-only)
- Can we SSH to the bare-metal host and use command line tools for manaagement? (Answer: YES, but we have to enable SSH)
NewerOlder