{"id":325,"date":"2016-05-25T10:52:35","date_gmt":"2016-05-25T09:52:35","guid":{"rendered":"http:\/\/www.adienicholls.co.uk\/blogs\/?p=325"},"modified":"2017-03-11T19:54:01","modified_gmt":"2017-03-11T19:54:01","slug":"ms-windows-remotely-delete-profile-script","status":"publish","type":"post","link":"http:\/\/www.adienicholls.co.uk\/blog\/ms-windows-remotely-delete-profile-script\/","title":{"rendered":"MS Windows Remotely Delete Profile Script"},"content":{"rendered":"<p>Use the below script to run a profile cleanup on a remote computer running MS Widows Vista\u00a0or newer<\/p>\n<p>You will need to download DelProf2 and save it to your PC or a shared network location. <a href=\"https:\/\/helgeklein.com\/free-tools\/delprof2-user-profile-deletion-tool\/\" target=\"_blank\">Download from here<\/a><\/p>\n<h2>How to use:<\/h2>\n<p>Save the below script as a &#8216;.bat&#8217; file, Update the robocopy path of where your delprof2 application is being stored.<\/p>\n<p>Running the batch file will present a CMD window asking for the asset tag (also known as hostname) of the PC this task is to be run on.<\/p>\n<p>On entering an asset tag the script will start the remoteregistry service of the remote PC, copy the DelProf2 application across to the local PC and then run the program using the defined criteria<\/p>\n<p>To customize the DelProf2 criteria see the above link for syntax and examples.<\/p>\n<p>&nbsp;<\/p>\n<pre>@echo off\r\nREM *********************************************\r\nREM A.Nicholls\r\nREM http:\/\/www.adienicholls.co.uk\/blogs\r\nREM 25\/05\/2016\r\nREM *********************************************\r\n\r\nREM Get remote PCs hostname\r\nset \/p id=Enter Hostname:\r\n\r\nREM this line starts the remote registry service\r\npsexec \\\\%id% cmd.exe \/c \"net start remoteregistry\"\r\n\r\nREM Copies the DelProf application to your local PC\r\nrobocopy \\\\Servername\\Shared\\DelProf c:\\ DelProf2.exe \/r:0 \/w:0\r\n\r\n\r\nREM Executes DelProf with a config\r\nC:\\DelProf2.exe -c:%id% \/u \/ed:admin* \/d:90\r\n\r\npause<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Use the below script to run a profile cleanup on a remote computer running MS Widows Vista\u00a0or newer You will need to download DelProf2 and save it to your PC or a shared network location. Download from here How to use: Save the below script as a &#8216;.bat&#8217; file, Update the robocopy path of where &hellip; <a href=\"http:\/\/www.adienicholls.co.uk\/blog\/ms-windows-remotely-delete-profile-script\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">MS Windows Remotely Delete Profile Script<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":326,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,178],"tags":[],"_links":{"self":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/325"}],"collection":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":1,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":327,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions\/327"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/media\/326"}],"wp:attachment":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}