Skip to content

Instantly share code, notes, and snippets.

View ZJPat's full-sized avatar

ZJP ZJPat

  • Washington, DC
View GitHub Profile
@ZJPat
ZJPat / Comparedirectory.ps1
Created August 27, 2024 00:43
How to compare directories in windows
robocopy.exe source target /l /e /zb /xx /xl /fp /ns /nc /ndl /np /njh /njs /ts
<#
Name: Get-OldADMachines.ps1
Author: James Schlackman
Updated by: Zane JPat, 08/19/2024
Last Modified: May 20 2024
1. Finds computer accounts that have been inactive for more than specified time period and optionally disables them
2. Finds computer accounts that have been disabled for more than specified time period and optionally deletes them
3. Added HTML code for better reportings and sepsarted the outputs
#>
@ZJPat
ZJPat / EntraADVer.ps1
Created July 4, 2024 04:03
Scrap EntraAD for the latest Version and release date
<# Based on https://old.reddit.com/r/PowerShell/comments/n686f4/web_scraping_and_building_a_table_better_methods/
Base usage at a MSP to keep track of the latest version in case autodl fails. #>
[Net.ServicePointManager]::SecurityProtocol = [Enum]::ToObject([Net.SecurityProtocolType], 3072)
$URI = "https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/reference-connect-version-history"
$webclient = New-Object System.Net.WebClient
$result = $webclient.DownloadString($URI)
$versions = @()
#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 <[email protected]>
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