Answered by:
Accessing elements of an Array

Question
-
What's wrong with this piece of code? I don't know what I am missing but it doesn't work for me.
I want to access the name of any file, one by one.
Please, help me.
#####################################
Set-Location d:\temp
$myarray = Get-ChildItem -Path .\*.log | Format-Table Name
$myarray[2]#######################################
Tuesday, August 6, 2013 8:30 PM
Answers
-
As this forum is dedicated to Training and (Microsoft) Certifications, you should post your question in the appropriate MSDN forum.
- Proposed as answer by Horizon_NetEditor Thursday, August 8, 2013 7:28 PM
- Marked as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
Tuesday, August 6, 2013 8:46 PMAnswerer -
Actually, it looks like a question about Powershell, so instead of the MSDN forums I'd suggest the Powershell forum at Technet:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell
- Proposed as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
- Marked as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
Monday, August 12, 2013 5:49 AM
All replies
-
As this forum is dedicated to Training and (Microsoft) Certifications, you should post your question in the appropriate MSDN forum.
- Proposed as answer by Horizon_NetEditor Thursday, August 8, 2013 7:28 PM
- Marked as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
Tuesday, August 6, 2013 8:46 PMAnswerer -
Actually, it looks like a question about Powershell, so instead of the MSDN forums I'd suggest the Powershell forum at Technet:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell
- Proposed as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
- Marked as answer by Danny van DamMVP, Editor Monday, August 12, 2013 9:14 PM
Monday, August 12, 2013 5:49 AM