Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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