Skip to content

Instantly share code, notes, and snippets.

View ZJPat's full-sized avatar

ZJP ZJPat

  • Washington, DC
View GitHub Profile
#requires -Version 5.0
<#
.SYNOPSIS
My Veeam Report is a flexible reporting script for Veeam Backup and
Replication.
.DESCRIPTION
My Veeam Report is a flexible reporting script for Veeam Backup and
Replication. This report can be customized to report on Backup, Replication,
Traceroute has started…
traceroute to www.google.com (172.217.3.196), 64 hops max, 72 byte packets
1 209.66.74.165.ipyx-139957-zyo.above.net (209.66.74.165) 10.115 ms 12.685 ms 33.592 ms
2 * ae3.cs4.iad93.us.eth.zayo.com (64.125.24.10) 11.624 ms *
3 ae15.er5.iad10.us.zip.zayo.com (64.125.25.167) 12.060 ms 10.475 ms 11.428 ms
4 64.125.13.190 (64.125.13.190) 9.217 ms 11.376 ms 10.360 ms
5 108.170.240.97 (108.170.240.97) 9.291 ms 9.484 ms 11.489 ms
6 108.170.240.98 (108.170.240.98) 11.369 ms 17.794 ms 12.610 ms
7 216.239.35.162 (216.239.35.162) 13.854 ms 12.548 ms 12.061 ms
#!/usr/bin/env bash
###############################################################################
# Admin - Global
###############################################################################
# Ask for the administrator password upfront
sudo -v
###############################################################################
Function Create-UpdateVBS {
Param ($computername)
#Create Here-String of vbscode to create file on remote system
$vbsstring = @"
ON ERROR RESUME NEXT
CONST ForAppending = 8
CONST ForWriting = 2
CONST ForReading = 1
strlocalhost = "."
Set oShell = CreateObject("WScript.Shell")
@ZJPat
ZJPat / .bash_profile
Created December 7, 2016 06:56 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ZJPat
ZJPat / Install-SkypeForBusiness2015.ps1
Created October 3, 2016 14:50 — forked from Hexalon/Install-SkypeForBusiness2015.ps1
Automates installation of Skype For Business 2015
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.119
Created on: 5/3/2016 09:37
Created by: Colin Squier <Hexalon@gmail.com>
Filename: Install-SkypeForBusiness2015.ps1
===========================================================================
.DESCRIPTION
Automates installation of Skype For Business 2015.
Get-ADComputer -Filter {(OperatingSystem -Like "Windows *Server*")-and (Enabled -eq "True")} -Property * | Select Name,OperatingSystem,OperatingSystemServicePack,IPv4Address | export-csv Servers.csv -notypeinformation
If (${env:ProgramFiles(x86)}) {
$uninstallpaths = Get-ChildItem -Path ${env:ProgramFiles(x86)}, $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname
}
Else {$uninstallpaths = Get-ChildItem -Path $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname}
If ($uninstallpaths) {
foreach ($uninstallpath in $uninstallpaths) {
Start-Process cmd -ArgumentList "/C `"$uninstallpath`" /S" -Wait
}
}
$NumDays = 0
$LogDir = ".\AD-Accounts.csv"
$currentDate = [System.DateTime]::Now
$currentDateUtc = $currentDate.ToUniversalTime()
$lltstamplimit = $currentDateUtc.AddDays(- $NumDays)
$lltIntLimit = $lltstampLimit.ToFileTime()
$adobjroot = [adsi]''
$objstalesearcher = New-Object System.DirectoryServices.DirectorySearcher($adobjroot)
$objstalesearcher.filter = "(&(objectCategory=person)(objectClass=user)(lastLogonTimeStamp<=" + $lltIntLimit + "))"
function Set-ComputerName {
param( [switch]$help,
[string]$CurrentPCName=$(read-host "Please specify the current name of the computer"),
[string]$computerName=$(read-host "Please specify the new name of the computer"))
$usage = "set-ComputerName -CurrentPCname CurrentName -computername AnewName"
if ($help) {Write-Host $usage;break}
$computer = Get-WmiObject Win32_ComputerSystem -CurrentPCname CurrentName -computername $currentPCName
$computer.Rename($computerName)