Profile cover photo
Profile photo
Josh Miller
47 followers
47 followers
About
Josh's posts

Put this at the top of your PowerShell script and save it as a BAT or CMD.  When you run, it will give a random error on the pipe to '#' then will copy itself and run itself.  

<#
if NOT EXIST %~dpn0.ps1 copy %~dpn0.Bat %~dpn0.ps1
powershell -noprofile -executionpolicy unrestricted -file %~dpn0.ps1 %* 
GOTO:EOF
#>

Oh, and make sure that this is added to a file with a BOM in the front or a powerShell command that doesn't translate to CMD commands.

It will fail if < is the first char in the file 

Post has attachment

Post has attachment
So Sad, where do I put all my feeds now?

Post has attachment

Post has attachment
Math Rocks

Post has attachment
I take it back #PowerShell is not glue.

Post has attachment

Post has shared content

Post has attachment

Post has attachment
Wait while more posts are being loaded