Тёмный

PowerShell 7 Tutorials for Beginners #8 : ForEach (Loops) 

JackedProgrammer
Подписаться 14 тыс.
Просмотров 8 тыс.
50% 1

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

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@Jon-rp4st
@Jon-rp4st 2 года назад
I think there is no one better than you on RU-vid! Thank you so much!
@NigelStroopwafel
@NigelStroopwafel Год назад
I love the format of your videos. I've been learning PowerShell for a few months and your teaching style works so much better than other courses I've learned from. After watching your other videos, I was able to understand how to create the first foreach loop before you explained it. Keep up the good work and thank you!
@ghostingalong
@ghostingalong 2 года назад
I’m appreciative of these for sure
@mrliuquantong4943
@mrliuquantong4943 7 месяцев назад
This is the best I have ever seen on youtube these years!!
@Jomster777
@Jomster777 2 месяца назад
Really big help on these tutorial videos. Thanks! I've now also learned how to delete multiple folders with the ForEach method as well.
@richardgarrow9260
@richardgarrow9260 Год назад
Another great learning video thanks Jack
@davidflint6917
@davidflint6917 2 года назад
I tend to use the second method over the first, as that allows begin, process, end
@BitPazzo
@BitPazzo 2 года назад
Top youtuber!!! 👋 👋
@ВикторЛарионов-й3к
@ВикторЛарионов-й3к 8 месяцев назад
Top youtuber!!!
@henrymdominguez
@henrymdominguez Год назад
Could you do a future video on a foreach loop that includes if else statements and PnPBatch? I've been scouring the internet for help with a script I'm writing to no avail.
@XwolfBane18
@XwolfBane18 Год назад
Hi Jack I have a question I have folder I want to synce for 15 users in sharepoint site , I have there username and password how do I go about scripting from my machine to make sure that folder is there when they sign into a device I’m new to script but I want to learn how to do it any guide would be appreciated
@dmitryepikhin2784
@dmitryepikhin2784 9 месяцев назад
I don't speak English well, sorry, I use a Google translator. I didn't understand where the $name came from here: foreach($name in $folderNames){... Tell me, please, what is $name means? I mean, we didn't set it as a variable before.
@lonedruid3360
@lonedruid3360 Год назад
I tested it and shows first one is the fastest #Fastest (1.13s) foreach($no in 1..1000000){$no} # (4.5s) (1..1000000).ForEach( {$_} ) #slowest (9s) 1..1000000 | ForEach-Object { $_ } i used measure-command to test it.
@jackedprogrammer
@jackedprogrammer Год назад
This is correct, if I were to make this again i would be recommeding the foreach($x in $array) as the fastest, measure-command is super useful good catch! :)
@netor-3y4
@netor-3y4 9 месяцев назад
$filePath="C:\Scripts\8 - ForEach\Data\FolderNames.txt" $foldersPath."C:\Scripts\8 - ForEach\Data\Share" $folderNames=Get-Content -Path $filePath foreach($name in $folderNames){ if((Test-Path -Path "$foldersPath\$name") -eq $false){ New-Item -Path "$foldersPath" -Name $name -ItemType Directory }else{ Write-OutputI"Folder exists" } } $folderNames | ForEach-Object -Process { if((Test-Path -Path "$foldersPath\$_") -eq $false){ New-Item -Path "$foldersPath" -Name $_ -ItemType Directory }else{ Write-Output "Folder exists" } } $FolderNames.ForEach( { if((Test-Path -Path "$foldersPath\$_") -eq $false){ New-Item -Path $foldersPath -Name $_ -ItemType Directory }else{ Write-Output "Floder exit" } } )
Далее
Cool Wrap! My Book is OUT 🥳
00:27
Просмотров 930 тыс.
Taking Control with PowerShell Logic
27:57
Просмотров 28 тыс.
PowerShell Quick Tips : Get-ChildItem
19:46
Просмотров 4,6 тыс.
PowerShell 7 Tutorials for Beginners #11 : Modules
18:48
PowerShell 7 Tutorials for Beginners #5 : Pipeline
16:46
While loops in Python are easy ♾️
6:58
Просмотров 389 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 72 тыс.