Skip to content

cd-users

Sets the working dir to the users directory

#requires -version 5.1

try {
	$path = Resolve-Path "~/.."
	if (-not(Test-Path "$path" -pathType container)) { throw "No users directory at: $path" }

	Set-Location "$path"
	$folders = Get-ChildItem $path -attributes Directory
	"📂$path with $($folders.Count) folders entered."
	exit 0
} catch {
throw
}

This script has no configurable parameters.

An interactive directory of PowerShell scripts.