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)}
The use of $
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
The use of $
This seems like a question for scriptinganswers.com
I'd suggest to post that there.
I'd suggest to post that there.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.