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
# Enable SNMP on ESXi 6.* | |
# Note: this is not secured SNMP3 | |
# | |
esxcli system snmp set --communities Public | |
esxcli system snmp set --enable true | |
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false | |
esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 192.168.1.0/24 | |
esxcli network firewall ruleset set --ruleset-id snmp --enabled true |
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
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$url = $( Read-Host "URL>") | |
) | |
youtube-dl.exe -x --audio-format mp3 --audio-quality 192K $url |
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 shell change appliance default to bash (needed for winscp transfers to vcenter) | |
chsh -s /bin/bash | |
# and back again with: | |
chsh -s /bin/appliancesh root | |
# May be pre-requisite to set shell.set --enable True in appliance root also depending on current settings | |
#Install certs (example: for intercepting proxy authentication): | |
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --chain --cert /path/to/cert.cer | |
# Note cert must be base64 encoded on export not DER encoded! | |
# View installed certs with /usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --chain --cert |
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 sends e-mails via smtp to a chosen address if an alert is triggered on a Dell Server system by OpenManage | |
# Pre-Requisites: Dell OpenManage installed, a mail server allowing smtp without authentication, omconfig on the system path | |
# or can be called by full path. Note: Dell omconfig alert action must be populated once per server with the list of commands | |
# at the end of this script | |
# Tested on 2008R2 and 2012R2 | |
#> | |
param( | |
[string]$body | |
) |
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
# contents of chocolateyuninstall.ps1 | |
$app = "C:\Program Files\Cisco Packet Tracer 7.0\unins000.exe" | |
$arguments =" /SILENT" | |
start-process $app $arguments |
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
# contents of chocolateyinstall.ps1 | |
Install-ChocolateyPackage ` | |
-PackageName 'packettracer' ` | |
-FileType 'exe' ` | |
-SilentArgs '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' ` | |
#-Url '\\uncpath\packettracer\PacketTracer70_64bit_setup.exe' ` | |
-Url64bit '\\uncpath\packettracer\PacketTracer70_64bit_setup.exe' ` | |
-Checksum 'F0270A04BE880297D8B6B20DC7F3690D4063E8FFECED533A03D6D7BB21574624' ` | |
#-Checksum64 'F0270A04BE880297D8B6B20DC7F3690D4063E8FFECED533A03D6D7BB21574624' ` |
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
# Create a vm from core-current.so - note vnc is used to "see" the guest and network:default means NAT not bridge | |
virt-install --name kvm1 \ | |
--ram 128 \ | |
--disk path=/var/lib/libvirt/images/kvm1.img,size=0.1 \ | |
--network network:default \ | |
--accelerate \ | |
--vnc -c /opt/Core-current.iso | |
# Show running guests which kvm calls a domain | |
virsh list |
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
#Send Keypresses | |
$wshell = new-object -com wscript.shell | |
$wshell.SendKeys("{CAPSLOCK}") | |
# Graphical input | |
$data = [Microsoft.VisualBasic.Interaction]::InputBox('hi user give me your data', 'inputboxtitle') | |
# Graphical output | |
[Microsoft.VisualBasic.Interaction]::MsgBox("tada", "OKOnly,SystemModal,Information", "msgboxtitle") |
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
# Grab mp3 creates mp3s from youtube-dl in a format that works in more devices which may have issues with VBR etc | |
# | |
# Requires: chocolately from chocolately.org then run this commented out line in an escalated powershell prompt: | |
# cinst youtube-dl ffmpeg lame -y --allowEmptyChecksums # some of these don't currently have checksums enabled by their maintainers | |
# Probably best to put this script somewhere in your system path | |
# Set up graphical input/output | |
Add-Type -AssemblyName Microsoft.VisualBasic | |
$link = "" #null | |
$link = [Microsoft.VisualBasic.Interaction]::InputBox('Paste in youtube URL or playlist url', 'grab-mp3') |
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
btrfs filesystem df /mnt/edu/ | |
btrfs dev stats /mnt/edu/ | |
btrfs scrub start -c3 <mount point> | |
brtfs fi show | |
# Add a btfs device to an existing mountpoint then mirror it on the fly with balance. | |
btrfs device add -f /dev/sdb /media/usb1/ | |
btrfs balance start -dconvert=raid1 -mconvert=raid1 /media/usb1/ | |
# defrag | |
btrfs filesystem defragment /media/usb1/ | |
# df |