This I learned today through powershell.com. If you want to open a notepad or iexplore, or someother application in maximized or minized or restored mode, you can do that easily with Powershell.
To open a process in maximized mode, use this.
Start-Process notepad -WindowStyle maximized
To open a process in minimized mode, use this
Start-Process notepad -WindowStyle minimised
To open a process in restored mode
Start-Process notepad -WindowStyle normal
To open a process in hidden mode
Start-Process notepad -WindowStyle hidden
You can query and kill all these processes at one shot by using below command
Get-Process -Name Notepad | Stop-Process
Hope it is useful to you.