Wednesday 9 September 2020

powershell 28 UI 1

 
progress bar

PS C:\Windows\System32> for($i = 0; $i -le 100; $i+=20){
>>     Write-Progress -Activity "Search in porgress" -Status "$i% complete:" -PercentComplete $i;
>>     Start-Sleep 1
>> }


PS C:\Windows\System32> get-childItem | Out-GridView -Title "File List"

PS C:\Windows\System32> [int]$age = Read-Host 'Enter age'
Enter age: d
MetadataError: Cannot convert value "d" to type "System.Int32". Error: "Input string was not in a correct format."

PS C:\Windows\System32> $password = Read-Host 'Enter password' -ASSecureString
Enter password: *******
PS C:\Windows\System32> write-output $password
System.Security.SecureString

reference:

No comments:

Post a Comment