cmd.exe "cmd.exe" /c "mkdir %%temp%%\T1222.001_cacls &amp; echo T1222.001_cacls1 &gt;&gt; %%temp%%\T1222.001_cacls\T1222.001_cacls1.txt &amp; echo T1222.001_cacls2 &gt;&gt; %%temp%%\T1222.001_cacls\T1222.001_cacls2.txt" powershell.exe ar-win-dc.attackrange.local