powershell scripts to create new iis site code example
Example 1: powershell add application to iis
IIS:\>New-WebApplication -Name testApp -Site 'Default Web Site' -PhysicalPath c:\test -ApplicationPool DefaultAppPool
Example 2: powershell scripts to create new web application on iis
PS IIS:\> New-Item 'IIS:\Sites\Default Web Site\DemoApp' -physicalPath c:\test -type Application