cd-root
Sets the working dir to the root dir
#requires -version 5.1
try {
if ($IsLinux -or $IsMacOS) { $path = "/" } else { $path = "C:\" }
Set-Location "$path"
$folders = Get-ChildItem $path -attributes Directory
$files = Get-ChildItem $path -attributes !Directory
"📂$path entered (has $($folders.Count) folders and $($files.Count) files)"
exit 0
} catch {
throw
}This script has no configurable parameters.