Skip to content

Instantly share code, notes, and snippets.

View trodemaster's full-sized avatar
💭
Pushing buttons

Blake Garner trodemaster

💭
Pushing buttons
View GitHub Profile
@trodemaster
trodemaster / PowerCli.txt
Last active October 20, 2016 02:02
Some install notes for macOS + .net core + powershell core + PowerCli core
#Install openssl via macports
sudo port install openssl curl
# create a dir in the path for library links
mkdir -p /usr/local/lib
# link tehse librarys ino the path. Not sure this is needed..
ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/
kernel_nics=`ip link show | grep mtu | grep -v lo | cut -d : -f 2 | tr -d "[:blank:]"`
first_nic=`echo "$kernel_nics" | sed -n 1p`
second_nic=`echo "$kernel_nics" | sed -n 2p`
Floppy files section of packer .json
"floppy_files": [
"answer_files/vmw/7/Autounattend.xml",
"scripts/bootstrap-win.ps1",
"FILES/pvscsi",
"FILES/vmxnet3"
],
Layout of files on disk.
# install vmware tools
write-output "Starting VMare Tools install"
# List of files to download. Add new files to the end.
$blobs = @("https://packages.vmware.com/tools/releases/latest/windows/x64/VMware-tools-10.0.9-3917699-x86_64.exe") # bmc patrol
write-output "Current file download list"
write-output $blobs
## Download the FILES
**********************
Windows PowerShell transcript start
Start time: 20160609222507
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Machine: WIN-S22AEF01O2B (Microsoft Windows NT 6.1.7601 Service Pack 1)
Host Application: C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -NonInteractive -File C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\cloudbase-init-firstboot.ps1
Process ID: 2164
PSVersion: 5.0.10586.117
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0.10586.117
List of KBs you do not need to install if you use the new Windows 7 rollup patch KB3125574
https://blogs.technet.microsoft.com/windowsitpro/2016/05/17/simplifying-updates-for-windows-7-and-8-1/
KB2491683
KB2506014
KB2506212
KB2506928
KB2509553
KB2511455
KB2532531
sudo ./VMware-Workstation-Full-12.1.1-3770994.x86_64.bundle --console --eulas-agreed --required --set-setting vmware-workstation serialNumber xxxx-xxxx-xxxx-xxxx
2016/04/14 14:01:36 [INFO] Packer version: 0.10.1 dev b50036c817a36094cbead945f73159d3c49ccaea
2016/04/14 14:01:36 Packer Target OS/Arch: darwin amd64
2016/04/14 14:01:36 Built with Go Version: go1.6
2016/04/14 14:01:36 Detected home directory from env var: /Users/bgarner
2016/04/14 14:01:36 [DEBUG] Discovered plugin: vagrant-vmware-ovf = /Users/bgarner/.packer.d/plugins/packer-post-processor-vagrant-vmware-ovf
2016/04/14 14:01:36 Using internal plugin for file
2016/04/14 14:01:36 Using internal plugin for vmware-iso
2016/04/14 14:01:36 Using internal plugin for vmware-vmx
2016/04/14 14:01:36 Using internal plugin for digitalocean
2016/04/14 14:01:36 Using internal plugin for virtualbox-ovf
{
"builders": [
{
"type": "vmware-vmx",
"source_path": "VM/WinSrv2008r2.vmx",
"communicator": "winrm",
"skip_compaction": "true",
"output_directory": "VM/WinSrv2008r2-fried",
"winrm_username": "administrator",
"winrm_password": "password1!",
#!/bin/bash
/usr/bin/curl "http://vsphereclient.vmware.com/vsphereclient/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg" -o ~/Downloads/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg
hdiutil attach -nobrowse ~/Downloads/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg
osascript -e "tell application \"Google Chrome\" to quit"
sudo installer -pkg /Volumes/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg/VMware\ Client\ Integration\ Plug-in.pkg -target /
hdiutil detach /Volumes/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg
osascript -e "launch application \"Google Chrome\""
/bin/rm ~/Downloads/VMware-ClientIntegrationPlugin-6.0.0.mac64.dmg