4

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

1 Answer 1

2

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

6
  • @Paradroid How can we run a .bat file via PowerShell by double click it ?
    – Nam G VU
    Apr 12, 2011 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, 2011 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, 2011 at 11:13
  • @Nam: Make sure you have the IIS admin tools installed and try Import-Module WebAdministration
    – paradroid
    Apr 12, 2011 at 11:27
  • @Nam: So did you sort it out in the end?
    – paradroid
    Apr 13, 2011 at 14:48

You must log in to answer this question.

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