I have a problem with my powershell script, i'm trying to find a file in a folder recursivly. The folder where i am looking is %temp%. Unfortunatly in this folder, there is some folder protected by admin right. Then when i am using Get-ChildItem, it return nothing exept an error (UnauthorizedAccessException).
Here is my code :
$path= (Get-ChildItem -path $ENV:TEMP -force -Recurse -Include logMyApp.txt).FullName
I also tryed with -ErrorAction SilentlyContinue but it does not work.
Thank you for your time :)
Edit : Trying to say Hello, but it does not work, stackoverflow policy ?
-Filterinstead of-Includeand then try with-ErrorAction SilentlyContinueagain :) - Mathias R. Jessen