Тёмный
No video :(

How to write progress bars with PowerShell 

PetterTech
Подписаться 2,1 тыс.
Просмотров 7 тыс.
50% 1

This video takes you step by step through how to create progress bars for your PowerShell scripts or functions.
Link to the code used in this video: github.com/Pet...
My socials:
Twitter: / pettertech
Twitch: / pettertech
Github: github.com/Pet...
windows powershell powershell tutorial powershell scripting powershell for beginners powershell core

Опубликовано:

 

6 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@PetterTech
@PetterTech 2 года назад
This video is somewhat based on a blog post I did ages ago. So if you prefer a written piece on this topic you can find it here: pettertech.com/2014/01/powershell-write-progress-a-step-by-step-guide/
@TheRealJohnMadden
@TheRealJohnMadden 2 года назад
Awesome video! I'm trying to learn PowerShell for my job to automate some mundane tasks in our IT department, this will make it look like I know what I'm doing xD Cheers!!
@PetterTech
@PetterTech 2 года назад
Haha, brilliant!
@GoingMod
@GoingMod 3 года назад
Thanks, trying to write progress for backing up the reg for reg changes. This helps a lot!
@PetterTech
@PetterTech 3 года назад
Glad it was helpful!
@Lil_mar00
@Lil_mar00 Год назад
broooooo, you just elevated my game. Thank you!
@PetterTech
@PetterTech Год назад
Glad to hear it!
@jonathanlapar2849
@jonathanlapar2849 2 года назад
Awesome job!! I added the child progress bar to one of my loops and it worked like a charm!
@PetterTech
@PetterTech 2 года назад
Fantastic! Glad you found a use for this!
@nevorchi
@nevorchi 2 месяца назад
Thank you sir, I appreciate this!
@PetterTech
@PetterTech 2 месяца назад
My pleasure!
@jonathanwitherspoon32
@jonathanwitherspoon32 2 года назад
This was so helpful. I am trying to use this in a script now. Also thanks for the Git link.
@PetterTech
@PetterTech 2 года назад
Really glad it was helpful :)
@realNAKAMI
@realNAKAMI 2 года назад
looking for a way to also have the progress display in the taskbar and it seems that it's not trivial...
@PetterTech
@PetterTech 2 года назад
Agreed. Had to look it up myself and currently there doesn't seem to be any easy way to do this yet. Hopefully there will be eventually, but I suspect that this is such a niche usecase that it will not be prioritized by Microsoft
@Andreasftw11
@Andreasftw11 3 года назад
This content is splendid
@PetterTech
@PetterTech 3 года назад
Thanks alot!
@blackholechennai
@blackholechennai 2 года назад
How to see progress for big file copy for the below line Copy-item c:\test1 -Destination c:\test2 -Recurse
@PetterTech
@PetterTech 2 года назад
If it's one big file then write-progress can't really help you. But if it's a lot of files then you can start by getting the full list of files and then throw that into a foreach loop which then writes progress AND copies the files. Consider this example: $AllFiles = Get-ChildItem C:\test1 -Recurse $progress = 1 foreach ($SingelFile in $AllFiles) { Write-Progress -Activity "Copying files" -Status "Working on $($SingelFile)" -PercentComplete ($progress/$AllFiles.count*100) Copy-Item -Path $SingelFile.FullName -Destination "c:\test2\$($SingelFile.FullName.substring(9))" $Progress++ }
@PetterTech
@PetterTech 2 года назад
The destination part might be a little obscure there but basically what it does is set the destination to c:\test2\ followed by whatever the path was before (minus the first 9 characters, in this case c:\test1\)
@blackholechennai
@blackholechennai 2 года назад
@@PetterTech thanks for quick help. That make scene 😉.
@jamesrumsey7241
@jamesrumsey7241 Год назад
Dude get a drink of water
Далее
НЕДОВОЛЬНА УСЛУГОЙ #shorts
00:27
Просмотров 21 тыс.
ВОТ ЧТО МЫ КУПИЛИ НА ALIEXPRESS
11:28
Просмотров 604 тыс.
Make Windows Terminal look amazing!
18:24
Просмотров 530 тыс.
How to use Write-Host for PowerShell
16:21
Просмотров 38 тыс.
Try / Catch for error handling in Powershell
8:52
Просмотров 1,2 тыс.
The Computer Chronicles - Windows 3.0 (1990)
28:42
Making progress bar with PowerShell
11:31
Просмотров 7 тыс.
PowerShell Fundamentals  Add-Member Cmdlet
41:59
Просмотров 1 тыс.