mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Improved the scripts
This commit is contained in:
@ -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
|
||||
|
@ -7,7 +7,7 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-Module
|
||||
get-module | format-table
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -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)"
|
||||
}
|
||||
|
Reference in New Issue
Block a user