Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

share|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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .