Skip to content

Instantly share code, notes, and snippets.

View Jackbennett's full-sized avatar

Jack Jackbennett

View GitHub Profile
[cmdletbinding(SupportsShouldProcess=$true,DefaultParameterSetName="User")]
Param(
[Parameter(Mandatory=$true,
Position=0,
ParameterSetName="User",
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Microsoft.ActiveDirectory.Management.ADUser[]]
[Parameter(Mandatory=$true,
Position=0,
function Clear-CCTV{
Param(
# Directory to clear
[parameter(mandatory=$true)]
[string]$Path
, # Archive Directory Path
[parameter(mandatory=$true)]
[string]$ArchivePath
@Jackbennett
Jackbennett / verbose.txt
Created January 31, 2019 12:08
code.exe --verbose from mapped network folder. No Directory junction
PS P:\VSCode\1.30.2-inside> .\Code.exe --verbose
PS P:\VSCode\1.30.2-inside>
[main 12:04:33 PM] Starting VS Code
[main 12:04:33 PM] from: p:\VSCode\1.30.2-inside\resources\app
[main 12:04:33 PM] args: { _: [],
help: false,
h: false,
version: false,
v: false,
wait: false,
@Jackbennett
Jackbennett / cli_ui_info_table.py
Created February 9, 2021 08:44
cli_ui info_table quick note to handle header = keys
def info_table(
data: Any, *, headers: Union[str, Sequence[str]] = (), fileobj: FileObj = sys.stdout
) -> None:
if headers == 'keys':
colored_data = dict()
plain_data = dict()
for row in data:
colored_row = list()
plain_row = list()
for item in data[row]: