When I want to convert a folder to an application, I proceed as below screenshot.

I'm looking for script to do this from a batch-command/.bat-file. Is it possible?

If it is, please share. Thank you!

enter image description here

link|improve this question

67% accept rate
feedback

1 Answer

You can use the ConvertTo-WebApplication PowerShell cmdlet. The graphic interface executes the same command.

link|improve this answer
@Paradroid How can we run a .bat file via PowerShell by double click it ? – Nam G. VU Apr 12 '11 at 10:14
@Nam: you can probably use a .bat file that runs the PowerShell command, but that seems silly. You can execute the PowerShell .ps1 script from the Run box or make a shortcut for it. – paradroid Apr 12 '11 at 10:47
@Paradroid Calling ConvertTo-WebApplication failed on my PowerShell. Trying to call add-pssnapin WebAdministration also failed. What should I do now? – Nam G. VU Apr 12 '11 at 11:13
@Nam: Make sure you have the IIS admin tools installed and try Import-Module WebAdministration – paradroid Apr 12 '11 at 11:27
@Nam: So did you sort it out in the end? – paradroid Apr 13 '11 at 14:48
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.