Hi everyone i am using the following code to delete files from inetpub but i am getting the error that some files cannot be deleted because they are being used by another process i am using the following code
if ($confirmation -eq 'y') { get-childitem "C:\inetpub\wwwroot\Russia\Admin" -recurse | % { remove-item $_.FullName -recurse -force } get-childitem "C:\inetpub\wwwroot\Russia\Tab" -recurse | % { if($_.Name -ne 'mediacontent') { remove-item $_.FullName -recurse -force }
}
}There are no services or anything, they all are dummy folders i am just replicating the production server file structure on to my local machine to get this script working so that we can later use it on production. all i did was copied all the folders from production and paste them in my local intet pub but its not working