mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-11 15:29:23 +01:00
Updated new-user.ps1
This commit is contained in:
parent
b72f6e6a6e
commit
b0caa06e29
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script creates a new user account with an encrypted home directory.
|
This PowerShell script creates a new user account with an encrypted home directory.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./new-user.ps1 Joe
|
PS> ./new-user.ps1 Joe
|
||||||
✔️ Created new user 'Joe' with encrypted home directory in 11 sec
|
✔️ Created new user 'Joe' with encrypted home directory in 11s.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -25,7 +25,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ Created new user '$username' with encrypted home directory in $elapsed sec"
|
"✔️ Created new user '$username' with encrypted home directory in $($elapsed)s."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user