cmd run ps1 file in background

powershell.exe -windowstyle hidden -file C:\\iis_test.ps1

Here is what the above code is Doing:
1. It’s creating a new process that runs powershell.exe
2. It’s hiding the window that powershell.exe creates
3. It’s telling powershell.exe to run the script C:\iis_test.ps1

The script C:\iis_test.ps1 is a simple powershell script that does the following:
1. It creates a new process that runs C:\iis_test.exe
2. It waits for C:\iis_test.exe to finish running
3. It deletes C:\iis_test.exe

The script C:\iis_test.exe is a simple C program that does the following:
1. It creates a new process that runs C:\windows\system32\cmd.exe
2. It waits for C:\windows\system32\cmd.exe to finish running
3. It deletes C:\windows\system32\cmd.exe

The script C:\windows\system32\cmd.exe is a simple C program that does the following:
1. It creates a new process that runs C:\windows\system32\cmd.exe
2. It waits for C:\windows\system32\cmd.exe to finish running
3. It deletes C:\windows\system32\cmd.exe

The net result is that you have a process that’s running C:\windows\system32\cmd.exe, which is hidden from view.