Skip to content

Instantly share code, notes, and snippets.

@andrewbbrown
andrewbbrown / Bootstra-notes-win-dev.txt
Created September 19, 2019 20:01
Bootstra-notes-win-dev
Install Chocolatey:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Install Boxstarter:
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-Boxstarter -Force
With powershell v3 or higher:
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force
try {
# Boxstarter options
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false # Is this a machine with no logon password?
$Boxstarter.AutoLogin=$true
Write-BoxstarterMessage "Ensuring ExecutionPolicy to Unrestricted..."
Update-ExecutionPolicy Unrestricted
## Write-BoxstarterMessage "Ensuring UAC is disabled..."
#$viserver = "192.168.68.20"
$viserver = "vcsa1-nadc-hl2.vlab.local"
$viusername = "[email protected]"
$vipassword = "VMware1!"
$viconnection = Connect-VIServer -Server $viserver -User $viusername -Password $vipassword
$datastore = Get-Datastore -Name "vsanDatastore" -Server $viconnection
New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root "\"
Get-WindowsFeature DHCP | Install-WindowsFeature -IncludeAllSubFeature -IncludeManagementTools
# Create an IPv4 DHCP Server Scope
Add-DhcpServerv4Scope -Name "Management-Internal-NADC-HL2" -StartRange 192.168.68.101 -EndRange 192.168.68.149 -SubnetMask 255.255.255.0 # -LeaseDuration = 00.00:30:30 -State Active
# Set the Router Option value
Set-DhcpServerv4OptionValue -ScopeId 192.168.68.0 -DnsServer 192.168.68.10 -DnsDomain vlab.local -Router 192.168.68.254
Get-WindowsFeature DHCP | Install-WindowsFeature -IncludeAllSubFeature -IncludeManagementTools
# Create an IPv4 DHCP Server Scope
Add-DhcpServerv4Scope -Name "Management-Internal-NADC-HL2" -StartRange 192.168.68.101 -EndRange 192.168.68.149 -SubnetMask 255.255.255.0 # -LeaseDuration = 00.00:30:30 -State Active
# Set the Router Option value
Set-DhcpServerv4OptionValue -ScopeId 192.168.68.0 -DnsServer 192.168.68.10 -DnsDomain vlab.local -Router 192.168.68.254
@andrewbbrown
andrewbbrown / style.css
Created May 13, 2018 01:38
Twenty Seventeen Full Width Page Template
/* THIS SECTION IS FOR THE ENTIRE WEBSITE PAGE WIDTHS - ADD TO THE END OF STYLE.CSS - START */
/* STRUCTURE */
.wrap {
max-width: 80% !important;
}
.page.page-one-column:not(.twentyseventeen-front-page) #primary {
max-width: 100% !important;
}
@andrewbbrown
andrewbbrown / Deploy-vLab-Standard-ESXI-VCSA-VSAN-DC1.ps1
Created May 10, 2018 20:21
Deploy-vLab-Standard-ESXI-VCSA-VSAN-DC1.ps1
# Author: William Lam
# Website: www.virtuallyghetto.com
# Description: PowerCLI script to deploy a fully functional vSphere 6.5 lab consisting of 3
# Nested ESXi hosts enable w/vSAN + VCSA 6.5. Expects a single physical ESXi host
# as the endpoint and all four VMs will be deployed to physical ESXi host
# Reference: http://www.virtuallyghetto.com/2016/11/vghetto-automated-vsphere-lab-deployment-for-vsphere-6-0u2-vsphere-6-5.html
# Credit: Thanks to Alan Renouf as I borrowed some of his PCLI code snippets :)
#
# Changelog
# 11/22/16
@andrewbbrown
andrewbbrown / Deploy-vSphere-ESXi-VCSA-vSan-Lab2.ps1
Created May 10, 2018 17:46
Deploy-vSphere-ESXi-VCSA-vSan-Lab2.ps1
# Physical ESXi host or vCenter Server to deploy vSphere 6.5 lab
$VIServer = "192.168.1.220"
$VIUsername = "root"
$VIPassword = "VMware1!"
# Specifies whether deployment is to an ESXi host or vCenter Server
# Use either ESXI or VCENTER
$DeploymentTarget = "ESXI"
@andrewbbrown
andrewbbrown / Deploy-vSphere-ESXi-VCSA-vSan-Lab.ps1
Created May 10, 2018 17:45
Deploy-vSphere-ESXi-VCSA-vSan-Lab.ps1
# Physical ESXi host or vCenter Server to deploy vSphere 6.5 lab
$VIServer = "192.168.1.220"
$VIUsername = "root"
$VIPassword = "VMware1!"
# Specifies whether deployment is to an ESXi host or vCenter Server
# Use either ESXI or VCENTER
$DeploymentTarget = "ESXI"
@andrewbbrown
andrewbbrown / Boxstarter-Win2k16-AEP-JumpBox-Setup.ps1
Created May 3, 2018 14:51
Boxstarter-Win2016-AEP-JumpBox-Setup.ps1
try {
# Boxstarter options
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false # Is this a machine with no logon password?
$Boxstarter.AutoLogin=$true
Write-BoxstarterMessage "Ensuring ExecutionPolicy to Unrestricted..."
Update-ExecutionPolicy Unrestricted
Write-BoxstarterMessage "Ensuring Internet Explorer ESC (IESC) is disabled..."