Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Nick Shores nshores

🏠
Working from home
Block or report user

Report or block nshores

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View failover_dns.ps1
#run on med7 dc (local)
$zonename = "healthcare.local"
$ip_table = @{
M7FS = "10.1.100.30";
M7KDM = "10.1.100.7";
M7DTS = "10.1.100.6";
M7KESM = "10.1.100.8";
TS2 = "10.1.100.37";
M7APP = "10.1.100.5";
View azure_upload_throtle.ps1
$mon = [System.DayOfWeek]::Monday
$tue = [System.DayOfWeek]::Tuesday
$wed = [System.DayOfWeek]::Wednesday
$thu = [System.DayOfWeek]::Thursday
$fri = [System.DayOfWeek]::Friday
Set-OBMachineSetting -WorkDay $mon, $tue, $wed, $thu, $fri -StartWorkHour "7:00:00" -EndWorkHour "22:00:00" -WorkHourBandwidth (10000*1024) -NonWorkHourBandwidth (90000*1024)
View fpx_profile_migration.ps1
#### EDIT ME
$newprofilepath = "\\adcfs01\profiledisks\"
$skip = "admin","administrator","ontimetech","adc","old","temp","automate","public","NerdioAdministrator@ADC.local","nerdioadmin","ontimetech.ADC"
#### Don't edit me
$ENV:PATH=$ENV:PATH;\\Pool-A000005.adc.local\c$\Program Files\FSLogix\Apps”
$oldprofiles = gci c:\users | Sort-Object LastWriteTime -Descending | select -expand fullname -First 2
@nshores
nshores / failed_logins.ps1
Last active Jul 30, 2019
failed_windows_logins.ps1
View failed_logins.ps1
$a = Get-EventLog -LogName 'Security' -InstanceId 4776 | select ReplacementStrings
$array = @()
foreach ($b in $a) {
$array += $($b[0].ReplacementStrings)[1]
}
Write-Output $array
Write-Output "Final Count"$array.Count
$array | out-file fail.csv
@nshores
nshores / nest_grafana_polling.py
Created Jul 19, 2019
nest_grafana_polling.py
View nest_grafana_polling.py
import nest
#https://github.com/jkoelker/python-nest
import sys
from influxdb import client as influxdb
db = influxdb.InfluxDBClient("localhost", 8086, "", "", "cacti2")
client_id = 'xx'
client_secret = 'xx'
@nshores
nshores / rubrik_sla_report.ps1
Last active Jul 16, 2019
Rubrik SLA Report
View rubrik_sla_report.ps1
#Rubrik SLA Report
# Possible Frequencies - $@{daily=; weekly=; monthly=; yearly=}
$server = '10.1.204.50'
$username = 'admin'
$password = ''
connect-rubrik -server $server -Username $username -Password $password
@nshores
nshores / rubrik_bootstrap_request.ps1
Last active Jul 15, 2019
rubrik_bootstrap_request.ps1
View rubrik_bootstrap_request.ps1
#New-RubrikBootStrap Documentation
#Example Usage --
#IPV4 Locally Assigned Link Address (169.254.x.x)
#Can also use MDNS name - IE VRVW564D3A0BC.local
$server = '169.254.11.25'
$name = 'RubrikEdge'
#Must Be an array even if you only have 1 server
$management_dns = @(
View get_ad_Group.ps1
$Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select name -ExpandProperty name)
$Table = @()
$Record = @{
"Group Name" = ""
"Name" = ""
"Username" = ""
}
View sql_log_monitor.ps1
#SQL Log monitor script
# http://ramblingcookiemonster.github.io/SQLite-and-PowerShell/
#Query DB, Select any events that match error code 3047 in last 5 minutes. If any match, restart service, else do nothing.
$database = '.\log.db3'
[datetime]$enddate = Get-Date -Format f
$startdate = $date.AddMinutes(-5)
#Query the DB
@nshores
nshores / azure_gw_ipsec_setup.ps1
Created Apr 19, 2019
azure_gw_ipsec_setup.ps1
View azure_gw_ipsec_setup.ps1
#default to msdn sub
Set-AzContext -Subscription "716f03d6-acff-467c-bca4-3c8eb56f549d"
# https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-tutorial-create-gateway-powershell
##Notes
10.1.220.0/23 ## Address Space
10.1.220.0/24 ## Frontend
10.1.221.0/24 ## Backend
You can’t perform that action at this time.