mardi 18 septembre 2018

"Path cannot be found" Pester Test Results

Im testing out a script on Pester. I keep getting a Path cannot be found error. Apparently something is wrong with some of my lines.

$userFolders = Get-ChildItem C:\Users -Directory

foreach($folder in $userFolders) { Get-ChildItem C:\Users\$folder\AppData\Local\Temp -Recurse | Remove-Item -Recurse -Force Get-ChildItem C:\Users\$folder\AppData\Local\Google\Chrome\User Data\Default\Cache -Recurse | Remove-Item -Recurse -Force } Get-ChildItem C:\Windows\Temp -Recurse | Remove-Item -Recurse -Force

I can't seem to find what is wrong, but I know it is somewhere here. Any help would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire