Skip to content

Instantly share code, notes, and snippets.

function Get-Uptime
{
[CmdletBinding()]
param
(
[Parameter(ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Alias('hostname')]
[Alias('cn')]
[string[]]$ComputerName = $env:COMPUTERNAME
@mweisel
mweisel / create-bridge-netif.sh
Last active August 25, 2021 07:35
A basic script to create bridge network interfaces for VMware Fusion and GNS3 integration for Mac OS X.
#!/usr/bin/env bash
# NAME: create-bridge-netif.sh
# AUTHOR: Marc Weisel
# DATE: 03/04/2014
# NOTES: Tested with Mac OS X 10.9 (Mavericks); Bash v3.2.51(1)-release
# FUNCTIONS
## Is the TAP network interface available?
tap_exist() {
function Get-WebWorkerProcessPlus
{
[CmdletBinding()]
param ( [switch]$Format )
function Format-HumanReadable($size)
{
switch ($size)
{
{$_ -ge 1PB}{"{0:#.#'P'}" -f ($size / 1PB); break}
@mweisel
mweisel / veos.vmx
Created July 27, 2014 18:26
Virtual machine configuration (.vmx) for vEOS on VMware Fusion 6
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "10"
vcpu.hotadd = "TRUE"
scsi0.present = "FALSE"
memsize = "1024"
mem.hotadd = "TRUE"
ide0:0.present = "TRUE"
ide0:0.fileName = "/Users/marc/Documents/Virtual Machines.localized/vEOS/Aboot-veos-2.0.8.iso"
ide0:0.deviceType = "cdrom-image"
@mweisel
mweisel / vsrx.vmx
Created August 2, 2014 18:12
Virtual machine configuration (.vmx) for vSRX on VMware Fusion 6
.encoding = "UTF-7"
displayname = "vSRX"
annotation = "Firefly Perimeter OVF Template"
guestos = "freebsd"
virtualhw.version = "7"
config.version = "8"
numvcpus = "2"
cpuid.coresPerSocket = "1"
memsize = "2048"
pciBridge0.present = "TRUE"
@mweisel
mweisel / Get-ExchangeServerPlus.ps1
Last active December 16, 2018 19:21
PowerShell function for Microsoft Exchange Server version and update information - https://binarynature.blogspot.com/2013/04/get-exchange-server-version-and-update-info-with-powershell.html
function Get-ExchangeServerPlus
{
<#
Get-ExchangeServerPlus
Written By Paul Flaherty, http://blogs.flaphead.com
Modified by Jeff Guillet, http://www.expta.com
Modified by Mark E. Smith, http://marksmith.netrends.com
Modified by Jason Sherry, http://blog.jasonsherry.net | Version 2.0
Modified yet again by Marc Weisel, http://binarynature.blogspot.com
@mweisel
mweisel / Get-DiskFree.ps1
Last active December 6, 2023 00:39
PowerShell advanced function (script cmdlet) to query, retrieve, and display local drive/disk information. (https://binarynature.blogspot.com/2010/04/powershell-version-of-df-command.html)
function Get-DiskFree
{
[CmdletBinding()]
param
(
[Parameter(Position=0,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Alias('hostname')]
[Alias('cn')]
@mweisel
mweisel / Vagrantfile
Last active February 25, 2019 21:19
Example - Cisco IOSv Vagrant box for VMware Workstation Pro with Windows 10
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "cisco-iosv-l2-152-2016"
config.vm.boot_timeout = 90
# Disable default host <-> guest synced folder
config.vm.synced_folder ".", "/vagrant", disabled: true
# Set guest OS type to disable autodetection