Reputation: 10888
I had a look at the properties available for objects returned by Get-ChildItem command using:
PS C:\> Get-ChildItem | Get-Member
This command shows that objects returned by Get-ChildItem command possess properties 'Name, FullName, LastAccessTime etc...'
I declare a variable to retrieve objects starting with 'Program':
PS C:\> $ChildItems_Program = Get-ChildItem -name 'Program*'
Checking what is stored in $ChildItems_Program
PS C:\> $ChildItems_Program
Program Files
Program Files (x86)
Trying to access properties 'Name, FullName, LastAccessTime' from the first object saved in $ChildItems_Program
PS C:\> $ChildItems_Program[0] | Select -Property Name, FullName, LastAccessTime
Name FullName LastAccessTime
---- -------- --------------
Why I can't see any results for above command- Shouldn't it return the properties of first object saved in $ChildItems_Program? Can anyone please guide.
Thank you!
Upvotes: 0
Views: 1621