This file contains hidden or 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 Write-Log() { | |
| [CmdletBinding()] | |
| Param( | |
| [switch]$Error, | |
| [string]$Message | |
| ) | |
| if ($Error) { | |
| $timestamp = (get-date -uformat "%Y%m%d-%H.%M.%S -").ToString() | |
| Add-content -path $ErrorLog -Value "$timestamp : $Message" |
This file contains hidden or 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
| $drives = @(Get-CimInstance Win32_LogicalDisk -Filter 'DriveType=3') | |
| Write-Host "Loading Logical Drives`n$drives" -ForegroundColor Cyan | |
| $logfile = 'C:\temp\FoundFiles.log' | |
| $logpath = 'C:\temp' | |
| If (!$logpath) {New-Item -ItemType Directory -Name 'temp'} | |
| #If (!$logfile) {New-Item -ItemType Directory -Name 'FoundFiles.log'} | |
| Write-host "Scanning Directories for files" -ForegroundColor Cyan |
This file contains hidden or 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
| $command = New-Object -TypeName System.Text.StringBuilder | |
| $services = New-Object System.Collections.ArrayList | |
| $AuvikPath = 'C:\Auvik' | |
| $DHCPRunning = $null | |
| $EventLogRunning = $null | |
| $AuvikPathExists = $null | |
| Function Script:DeepSearch { | |
| $Drives = @(Get-CimInstance Win32_LogicalDisk -Filter 'DriveType=3') |
This file contains hidden or 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 ntpdate 0.us.pool.ntp.org |
This file contains hidden or 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
| $command = New-Object -TypeName System.Text.StringBuilder | |
| $Array = New-Object -TypeName System.Collections.ArrayList | |
| function set-arg { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(ValueFromRemainingArguments)] | |
| [String[]]$param, | |
| [switch]$invoke = $false |
This file contains hidden or 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
| #!/usr/bin/python3.7 | |
| """ | |
| This will determin your OS version | |
| and download the appropriate copy to a directory | |
| """ | |
| import os | |
| import sys | |
| import platform | |
| import urllib.request |
This file contains hidden or 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
| using namespace System | |
| using namespace System.DirectoryServices | |
| class ADSearch | |
| { | |
| [Searchresult]$object | |
| [DirectoryEntry]$DirectoryEntry | |
| [PSCustomObject]$properties | |
| $UserAccountControl |
This file contains hidden or 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 PSEnv { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(ValueFromPipelineByPropertyName)] | |
| [ValidateSet('Install', 'Init', 'Remove')] | |
| [String]$Operation, | |
| [parameter(ValueFromPipelineByPropertyName)] | |
| [string]$module_name | |
| ) |
This file contains hidden or 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
| (Get-ChildItem -file) | foreach { | |
| if (!$(Test-Path $_.Extension)) { | |
| mkdir "$($_.Extension)" | |
| } | |
| move-item $_.Name -Destination "$($_.Extension)" -Verbose | |
| } |
This file contains hidden or 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
| [ | |
| { | |
| "pkgName": "obs-studio", | |
| "displayName": "OBS Studio", | |
| "publisher": "Open Broadcaster Software", | |
| "publisherSite": "https://obsproject.com/", | |
| "pkgVersion": "27.0.1", | |
| "pkgSource": "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-27.0.1-Full-Installer-x64.exe", | |
| "hash": "844F54C4ACF1ABBD51612CC9D4470E2E3A937106E5BE69BC94BBA7859FB748CD", |