About
Pricing
Community
Teams
Start Free Trial
Log in
RayT
asked on
3/31/2017
Arrays & Loops in PowerShell
How do I modify the following script to use Arrays and Loops?
I would like the search folders to be in an array. Then I can just loop through the array.
$compareDate = (Get-Date).AddDays(-14)
$temp = Get-ChildItem "c:\vbapps\ASP.NET_Apps\" -Recurse| Where-Object { $_.LastWriteTime -ge $compareDate } | Select FullName
$result = $temp
$temp = Get-ChildItem "c:\vbapps\WinForms_Apps\"
-Recurse| Where-Object { $_.LastWriteTime -ge $compareDate } | Select FullName
$result = $temp + $result
$result
Powershell
4
3
Last Comment
RayT
8/22/2022 - Mon
SOLUTION
David Johnson, CD
4/1/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Chris Dent
4/1/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Qlemo
4/1/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
RayT
4/1/2017
ASKER
Thanks! That's what I needed.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck