Improved the scripts

This commit is contained in:
Markus Fleschutz
2021-01-09 12:36:37 +01:00
parent f70b65d3e2
commit 77df424774
5 changed files with 10 additions and 7 deletions

View File

@ -1,16 +1,18 @@
#!/snap/bin/powershell
<#
.SYNTAX ./display-time.ps1
.DESCRIPTION displays the current time
.SYNTAX ./display-time.ps1 [<seconds>]
.DESCRIPTION displays the current time for 10 seconds by default
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
param([int]$Seconds = 10)
try {
for ($i = 0; $i -lt 1000; $i++) {
$CurrentTime = Get-Date -format "yyyy-MM-dd HH:mm:ss"
for ([int]$i = 0; $i -lt $Seconds; $i++) {
clear-host
write-output ""
$CurrentTime = Get-Date -format "yyyy-MM-dd HH:mm:ss"
./write-big $CurrentTime
write-output ""
start-sleep -s 1

View File

@ -7,7 +7,7 @@
#>
try {
Get-Module
get-module | format-table
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -15,6 +15,7 @@ function ListScripts { param([string]$Path)
'Description' = "$($Row.Description)"
}
}
write-progress -completed "Reading $Path..."
write-output ""
write-output "($($Table.Count) PowerShell scripts total)"
}