
+ BitWarden module for easy autologon (not very secure but convinent on personal machines) - Will think this over some more afterwards * Get-Path will always return without trailing directory separator (might want to make this 'always' for dirs, but unsure yet) + Added Edit-MountUnit scaffolding for later modifying it to import a template on new mount units, and easy edit of systemd mount and automount units.
14 行
292 B
PowerShell
14 行
292 B
PowerShell
[CmdletBinding()]param(
|
|
[string]$MountPath,
|
|
[switch]$NoAutoMount
|
|
)
|
|
|
|
$local:pathChar = [IO.Path]::DirectorySeparatorChar
|
|
$MountPath = Get-Path $MountPath
|
|
$local:MountName = $($($(
|
|
$MountPath -replace '-','\\x2d'
|
|
).Replace( $pathChar, '-' )
|
|
) -replace '^-',''
|
|
)
|
|
|
|
$MountName
|