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
# For PowerShell v2; Otherwise, Set-Service cmdlet exists in v3+ with -StartupType parameter! | |
function Set-ServiceStartupMode { | |
[CmdletBinding()] | |
param ( | |
[String[]]$ComputerName, | |
[String]$ServiceName, | |
[ValidateSet("Boot","System","Automatic","Manual","Disabled")] | |
[String]$StartupMode, | |
[Parameter(Mandatory=$False)] | |
[Management.Automation.PSCredential]$Credential |
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
# What I followed to do containers (Microsoft's Quickstart Guide): | |
# https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quickstart | |
break | |
# Run on Server Core 2016 TP3 | |
Start-Process PowerShell -Verb runAs | |
mkdir c:\scripts | |
wget -uri http://aka.ms/setupcontainers -OutFile c:\scripts\containersetup.ps1 | |
c:\scripts\containersetup.ps1 #This script took ~50 minutes, but downloads/installs Docker too |
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
<# | |
Links: | |
https://github.com/ScriptAutomate/AuditTools | |
https://halfwaytoinfinite.com/ | |
https://twitter.com/ScriptAutomate | |
https://secure360.org | |
#> | |
break # To prevent accidental example script execution |
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
break # To prevent accidental example script execution | |
Import-Module ActiveDirectory | |
# Create all groups for serverset1 | |
$FirstServerSet = Get-Content "serverset1.txt" | |
$FirstOU = "OU=Loc1,OU=Groups,DC=contoso,DC=com" | |
foreach ($Server in $FirstServerSet) { | |
New-ADGroup "$Server.AdminGroup" -Path $FirstOU -GroupScope Global | |
} |
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
exit #prevent accidental run of script | |
# App versions | |
PACKERVER='0.10.1' | |
VAGRANTVER='1.8.5' | |
CHEFDKVER='0.17.17' | |
CHEFDKRUBYVER='2.1.0' | |
CHEFDKRUBYPATH="export PATH=\"$PATH:/home/dscripter/.chefdk/gem/ruby/$CHEFDKRUBYVER/bin\"" | |
# Install Git and Unzip |
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
import mechanicalsoup | |
import argparse | |
def get_ticker(): | |
""" | |
Grab user supplied arguments using the | |
argparse library. | |
""" | |
parser = argparse.ArgumentParser( |
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
import argparse | |
""" | |
Quadratic equation root calculator | |
""" | |
def get_arguments(): | |
parser = argparse.ArgumentParser( | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter, |
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
import argparse | |
""" | |
Creates multiplication tables | |
""" | |
def get_arguments(): | |
parser = argparse.ArgumentParser( | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter, |
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
# Initial VM updates | |
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean | |
# Vars for download/install endpoints | |
VSCODE='vscode.deb' | |
CHEFDK='chefdk.deb' | |
VSCODEURL='https://go.microsoft.com/fwlink/?LinkID=760868' | |
CHEFDKURL='https://packages.chef.io/files/stable/chefdk/3.1.0/ubuntu/18.04/chefdk_3.1.0-1_amd64.deb' | |
# Dev tool downloads |
OlderNewer