by Eric at 2012-09-13 22:55:26
I am going to be moving a .NET app over to 2012-IIS8 soon and with it need to build a script to setup the web application to a farm of VM's running the app from a fileshare. To do this with IIS7 I had to use CASPOL to open access for the app to the server share. My question is do I need to call CASPOL.exe or is there a new commandlet that wraps the functionality of capsol?
by willsteele at 2012-09-14 05:06:30
Most of what you are trying to accomplish should be doable with the WebAdministration cmdlets. Between Set-WebConfiguration, Set-WebConfigurationProperty and a good understanding of the various sections in each .config file, as well as the relationships of the .config file themselves, you should be able to cover most scenarios. If there is a specific set of properties/settings you need help with feel free to post them here, or, perhaps on the IIS.NET site, and we can more than likely help you get them set up.
I am not an IIS wizard by any means, and, posting HERE is definitely the right place to start. I have fought a few battles with IIS, so, if you poke around my blog there are some useful write ups on how to access/modify a lot of IIS settings via PowerShell as well as with the IIS Configuration GUI's. http://learningpcs.blogspot.com/search?q=iis+powershell When you get to a specific set of questions, throw them on here and Jason will more than likely have an answer (or at least a direction to look) for you. (No pressure Jason.)
Lastly, one of the most useful pages I have seen today with regards to IIS and PowerShell is this: http://blogs.iis.net/jeonghwan/archive/2008/07/30/iis-powershell-user-guide-comparing-representative-iis-ui-tasks.aspx. Tons of information on there. Also, if you have not really looked around the IIS.NET site, you have to dig around. There really are more resources than most people realize out there. It's just a matter of taking some time to hunt around. There have only been a handful of tasks that I had to figure out on my own after punching through IIS.NET and the GUI/script generation wizard.
by Eric at 2012-09-14 08:43:05
Thanks Will I will check out the links. Ironically iis.net was where I first figured out I needed caspol to configure .net to run the remote code.
by Eric at 2012-09-14 15:36:13
Though the links were helpful that did not RESOLVE my issue and that was partially my fault for not explaining what I was doing
I needed to use casPol for my .NET webform because I store the app out on a fileserver and in order for .NET to run managed code from a fileserver it has to be opened up with the casPol utility. My question was is there a POSH abstraction that I could script with instead of going down to the level of running the exe in a script. Digging around some more it appears that as of .NET 3.51 it is not even necessary. I am currently trying to verify that.
by JasonHelmick at 2012-09-14 15:40:35
Hey Eric, is this what your looking for? If not let me know....
http://gallery.technet.microsoft.com/sc ... l-f2c61fb1
by Eric at 2012-09-14 16:05:02
bingo! I was going to ask you last night about it but you and Hal were on a roll with the Summit discussion I deferred it the forum.
by JasonHelmick at 2012-09-14 16:18:59
Great! Let me know how it goes!
by willsteele at 2012-09-14 16:28:12
Jason's the man! Great script. Hadn't seen those yet. Need to bookmark those in my head.