Try to deploy bat script in MDT Task sequence but fail with popup error "dirty environment found"
hi
Try to deploy bat script in MDT Task sequence but fail with popup error "dirty environment found"
where to put script in standard task sequence to avoid "dirty environment found"
message
I putted in State Restore ==> Custom Task folder
2 answers
Sort by: Most helpful
-
-
Simon Ren-MSFT 36,556 Reputation points Microsoft Vendor
2021-02-04T09:21:50.1+00:00 Hi,
Thanks for posting in Microsoft MECM Q&A forum.
Based on my experience, you have put the batch script in a location that doesn't match in you command line. Put the batch script in the Scripts folder of your deployment share; the location will be %SCRIPTROOT% and you'll run something like cmd.exe /c %SCRIPTROOT%\Updates.bat. If you want to use a different folder in the deployment share, just remember the variable %DEPLOYROOT% points to the root of your share. You could run it from %DEPLOYROOT%\Custom\Updates.bat, for example, where Custom is a folder you've created in the deployment share.
Thanks for your time.
Best regards,
Simon============================================================
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.