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
$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) |
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
#### 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 | |
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
$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 |
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
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' |
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
#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 |
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
#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 = @( |
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
$Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select name -ExpandProperty name) | |
$Table = @() | |
$Record = @{ | |
"Group Name" = "" | |
"Name" = "" | |
"Username" = "" | |
} |
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
#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 |
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
#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 |
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
#upload iso to datastore | |
$datastore = Get-Datastore "PK-VOL-01" | |
New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root "\" | |
Copy-DatastoreItem -Item c:\users\dsatech\2016.iso -Destination ds:\ |