How to add a application pool in iis by command line? - iis

I want to create a application pool in IIS by using command line. I don't know the command line to create it. Please help me if you did.Thanks so much!

Even easier if you use New-WebAppPool from the Web Server (IIS) Administration Cmdlets.

Related

Batch file to Stop/Start a Website in IIS 6.0

I an IIS reset each time after we do deployments using a batch file that does the following
IISRESET.EXE SERVER01 /RESTART
However, this is now a problem since we are currently hosting other website instances in the same IIS in SERVER01. My question is, is it possible to just do a quick refresh/restart of a single site instance from IIS? How do I achieve this? Also, is it going to have the same effect as restarting the entire IIS?
Thanks a lot!

run sharepoint powershell from c# on another PC?

If the C# application is on the same server as sharepoint, I know we can use RunSpace to run the pwoershell script, but what if the C# app. and sharepoint server are on different PCs?
Is this possible?
thanks
yes, its possible, though messy. In Powershell 2.0+, there's a feature called remote powershell, so you can effectively, via c# code, send Powershell commands to your local powershell instance, and use that to log into the remote instance.
A slightly less insane idea would be to simply create a web service on the remote machine, and have that run the remote powershell commands, from the web service.
And even less crazy idea is just to write a web service, and have that run code on the remote server. : )
Good luck!
If you are administrator on the remote box, you can try combining PsExec and PowerShell.

How to setup default document for a IIS website from command prompt?

I want to set default document for a IIS website from command prompt.
May I know how to setup this..
Thanks,
Mahesh
You can use appcmd.exe:
appcmd set config /section:defaultDocument /enabled:true|false
Check appcmd help at MSDN (or here) for more information.
http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe

Web frontend to my Powershell scripts for helpdesk

I'd like to have a web frontend to my powershell scripts for helpdesk.
These scripts would typically be user-creation scripts and scripts to restart a specific service on a specific server.
Where should I start? What would I need?
There is no problem for me to set up a IIS for this purpose if needed. We also have Sharepoint on a dedicated server.
Hoping for some startup-tips:)
You can consider Powershell Web Access feature on Powershell V3.0
http://technet.microsoft.com/en-us/library/hh831611.aspx
This is a robust solution, factoring in IIS, security and shell access.
You can use PowerShell Remoting. You can open a PS session that would look like a local PS console to you but it would be running on the remote machine. You can type PS code to be executed remotely and launch a buch of ready-to-run ps1 scripts for SP administration there too. Have a look at those links, for example:
http://www.computerperformance.co.uk/powershell/powershell_remote.htm,
http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/17/learn-how-to-manage-remote-powershell-sessions.aspx
--- Ferda

How to change deploy server in visual studio 2010 for web part?

I have a web part that I have been deploying to Server A. I now have a new SharePoint environment I would like to deploy my web part to (Server B). How can I set the web part solution to deploy to Server B rather than Server A? I have done this before but cannot find the place to do it.
Thanks.
To Deploy from Visual studio, VS needs to be installed on the server you're deploying to. To change the site you're deploying to for development/debugging purposes is a property on the project file in VS.
Shane
To clarify select the project in solution explorer then edit the Site URL property in the Properties toolbox, do not right click and select properties.
In order to deploy to a remote SP application, I recommend using PowerShell scripts that are run on the remote server. That is what I did, and it works well. Much easier than stsadm.
Change the Site Url in Project Properties to deploy in desired server.
u can use stsadm command to deploy into new server

Resources