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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Node-Link Tree (Radial)</title> | |
<script type="text/javascript" src="https://github.com/d3/d3/raw/2c030290457a4eac0efe34b1c7a61a29997ac3ef/d3.js"></script> | |
<script type="text/javascript" src="https://github.com/d3/d3/raw/2c030290457a4eac0efe34b1c7a61a29997ac3ef/d3.layout.js"></script> | |
<style type="text/css"> | |
circle.node { |
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
$ScheduledJob = @{ | |
Name = 'DNS Updater' | |
Trigger = New-JobTrigger -Once -RepetitionInterval 0:15 -RepeatIndefinitely -At 10:30 | |
Credential = (Get-Credential) | |
ScriptBlock = { | |
#Your info goes here | |
$hostname = "HOSTNAME.com" | |
$CurrentRecord = Resolve-DNSName -Name $hostname -Type A -Server 8.8.8.8 -DnsOnly | select -exp IPAddress |
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
@echo off | |
setlocal | |
rem | |
rem Set variables for local use | |
rem | |
set TEMPL=media | |
set FWFILES=fwfiles | |
set DISKPARTSCRIPT=%TMP%\UFDFormatDiskpartScript.txt | |
set EXITCODE=0 |
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
@Echo off | |
REM | |
REM Sets the PROCESSOR_ARCHITECTURE according to native platform for x86 and x64. | |
REM | |
IF /I %PROCESSOR_ARCHITECTURE%==x86 ( | |
IF NOT "%PROCESSOR_ARCHITEW6432%"=="" ( | |
SET PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITEW6432% | |
) | |
) ELSE IF /I NOT %PROCESSOR_ARCHITECTURE%==amd64 ( |
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
class ValidateComputernameAttribute : System.Management.Automation.ValidateArgumentsAttribute { | |
[void] Validate([object]$arguments, [System.Management.Automation.EngineIntrinsics]$engineIntrinsics) { | |
$ComputerName = $arguments | |
$FilterPattern = '\\|/|:|\*|\?|"|<|>|\|' | |
$MaxLength = 15 | |
$Length = $ComputerName.Length | |
if([string]::IsNullOrWhiteSpace($ComputerName)) { | |
Throw [System.ArgumentNullException]::new() | |
} elseif ($Length -gt $MaxLength){ | |
throw [System.Exception]::new("The character length of the argument ($Length) is too long. Shorten the character length of the argument so it is fewer than or equal to $MaxLength characters, and then try the command again.") |
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
Function Disable-CompanyUser { | |
[CmdletBinding(SupportsShouldProcess=$true)] | |
Param() | |
DynamicParam { | |
New-DynamicParams -count (($PSBoundParameters.GetEnumerator() | Measure-Object).Count - 1) -settings @( | |
($true | Select-Object @{ | |
N="Name" | |
E={"User"} | |
},@{ | |
N="SetScript" |
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
$ComputerInfo = @( | |
@{ | |
Class = 'Win32_OperatingSystem' | |
Select = @( | |
@{ | |
N='OS Name' | |
E={($_.Name -split '\|') | select -first 1} | |
}, | |
@{ | |
N='Version' |
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
if (-not((clist -lo) -match 'Defraggler')) { | |
choco install defraggler -y | |
} | |
$VerbosePreference = 'Continue' | |
cd 'C:\Program Files\Defraggler\' | |
# Start with the VHDs mounted, online and read/write so that you know their drive letters | |
$Disks = @( |
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
function Get-DirectoryServicesComputer { | |
[cmdletbinding()] | |
Param( | |
[switch]$ShowPath | |
) | |
[string[]]$Selector = @( | |
'ComputerName' | |
) | |
if ($ShowPath) { |
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
sudo apt update | |
sudo apt full-upgrade -y | |
sudo apt install -y default-jre apt-transport-https | |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list | |
sudo apt update | |
sudo apt install elasticsearch mongodb -y | |
wget https://packages.graylog2.org/repo/packages/graylog-2.4-repository_latest.deb |