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
[CmdletBinding()] | |
param ( | |
[Parameter(ParameterSetName = "SSHURI")] | |
[System.Uri] | |
$SSHURI, | |
# | |
[Parameter(ParameterSetName = "ComputerName", Mandatory)] | |
[string] | |
$ComputerName, | |
# Parameter help description |
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
$CustomHistoryHandler = { | |
param([string]$line) | |
$AllowListRegex = @( # Add keywords to match that you want to allow in your history file. | |
"Get-TokenFromOutlook" | |
) -join '|' | |
$DenyListRegex = @( # Add keywords to match that you don't want in your history file | |
"correcthorsebatterystaple" | |
) -join '|' |
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-SaveFilePath { | |
[CmdletBinding()] | |
param ( | |
[string] | |
$InitialDirectory = $PWD, | |
[string] | |
$Filter | |
) | |
begin { |
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
#Requires -Module Spotishell | |
# Install and setup Spotishell | |
# https://github.com/wardbox/spotishell | |
$InformationPreference = "Continue" | |
# Set your spotify username here | |
$username = "myspotifyusername" | |
$public_playlists = Get-UserPlaylists -Id $username | Where-Object { $_.owner.uri -eq "spotify:user:$username" -and $_.public} |
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 Add-GeneratedUsers { | |
<# | |
.SYNOPSIS | |
Creates Generated Users | |
.DESCRIPTION | |
This function creates users automatically. Just provide some information if customization is needed | |
.PARAMETER Count | |
How many users will be created. |
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 FillDisk { | |
param ( | |
$FillLimit = 20MB | |
) | |
$remaining = (Get-Volume C | Select-Object -ExpandProperty SizeRemaining) - $FillLimit | |
$filename = "vss-block_{0}G.dummy" -f ([math]::Round($remaining/1GB, 2)) | |
& fsutil file createnew $filename $([math]::Floor($remaining)) | |
} |
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
[CmdletBinding(DefaultParameterSetName = "PreDown")] | |
param ( | |
[Parameter(ParameterSetName = "Setup")] | |
[switch] | |
$Setup, | |
[Parameter(ParameterSetName = "Setup")] | |
[switch] | |
$RestartWGService, | |
# WireGuard Interface | |
[Parameter(Position = 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
#!/bin/bash | |
# Variable Section | |
SERVER="[email protected]" | |
SRC=$SERVER":/media/sdf1/username/Completed" | |
DEST="/media/Share/" | |
LOGDIR="/var/log/sync-seedbox/" | |
LOGFILE="/var/log/sync-seedbox/rsync_`date +%Y%m%d-%Hh%M`.log" | |
LOCKDIR="/var/lock/" | |
LOCKFILE="/var/lock/`basename $0`.lock" |
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
#Sophos Endpoint Removal Script | |
#Usage examples: | |
# .\removesophos.ps1 # Just logs all messages to screen and file.ss.é | |
# .\removesophos.ps1 -Remove YES # Removes all Sophos components and logs all messages to screen and file. | |
# .\removesophos.ps1 -Password 1234567 -Remove YES # Password will be provided to SEDCli.exe if TP is on and SEDCLi.exe exists. | |
# .\removesophos.ps1 -ErrorOnly YES # Only print items that exist (errors) on screen. Still logs all to file. | |
# .\removesophos.ps1 -Remove YES -Restart YES # At the end of the process restart the computer. 10 seconds delay by default intDelaySecondsRestart. | |
# .\removesophos.ps1 -NoLogFile YES # No log file will be created. Messages will still be output to screen. Will run quicker. | |
# .\removesophos.ps1 -Debug YES # Outputs a little more data to screen for debugging purposes. Not expected to be used in normal use. |