Has any used PowerShell to try and execute scripts instead of using the command prompt? I have gotten something to semi work, but I can't figure out the /i portion of the parameter. With out it, it will run the script but not on the dwg files, With it, it will throw errors. I narrowed it down to the /i, I will keep working on it, but just wanted to see if anyone else is attempting to use PS. Below is a sample of what I have used so far. Thanks.
Get-ChildItem "C:\Temp\*.dwg" | ForEach-Object {& 'C:\Program Files\Autodesk\AutoCAD 2020\accoreconsole.exe' /s "C:\Temp\Clean.scr" /l en-US}