The use of $

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 12 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
WildWind
Posts: 2
Last visit: Tue Feb 14, 2012 3:09 am

The use of $

Post by WildWind »

I'm new to Powershell, trying to switch over from VBScript and doing my best to learn it.I've search reference sites and docs but cannot find much on the "$" use, outside of "$_" referring to the current input object.My question is... What is the leading $ doing in the 3rd line of this code?
$filesToRemove = Get-Childitem $path -recurse |?{ !$_.PSIsContainer -and$($_.LastWriteTime -lt $oldestAllowed) -and($_.Extension -eq $extension)}
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

The use of $

Post by Alexander Riedel »

This seems like a question for scriptinganswers.com
I'd suggest to post that there.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 12 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.