JamesC Posted February 18, 2011 Posted February 18, 2011 There is a great guide with forfiles.exe available for download here: JJClements.co.uk » Delete files older than certain number of days 1
PEO Posted May 23, 2011 Posted May 23, 2011 sorry to dig up old post but when i tried the powershell script above the powershell cmd says the execution of scripts is disabled on this system. what do I need to set first before running the script?
Steve21 Posted May 23, 2011 Posted May 23, 2011 sorry to dig up old post but when i tried the powershell script above the powershell cmd says the execution of scripts is disabled on this system. what do I need to set first before running the script? Normally I find UAC is fussy with scripts, on remote shares. (As there's no "run as admin" like on exe's). If you move it to C:\ does it work? Or if it normally works just not with powershell check your execution policy default is powershell scripts can't run, but cmdlets can. (Restricted level) Steve 1
PEO Posted May 23, 2011 Posted May 23, 2011 Hello, i was testing the script on my windows 7 machine. I disabled UAC and rebooted. Additionally i ended up seting the execution policy to unrestricted. it all works fine now. Cheers
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now