Search
Home IIS.NET Forums IIS 7 & IIS 8 Configuration & Scripting Configure Servicer Side Includes with Power Shell
Last post Feb 07, 2012 11:28 AM by walter.lohmann
6 Posts
Jan 25, 2012 02:48 PM|LINK
Hi guys,
I am just trying to configure our IIS completely through Power Shell.
But at the moment I really have now idea how to add, alter and delete Server Side Includes in IIS through Powershell?
I try to do this with the following parameters: vhost_name Default Web Site ssi_extension .html directory /testfolder
can anyone help me please? thanks a lot!
654 Posts
Jan 27, 2012 05:36 AM|LINK
I think SSI is supported by default for extension .shtml
If you have access to IIS manager, check setting of .shtml extension.
Jan 27, 2012 10:13 AM|LINK
you are right, but I try to change that settings using powershell, not the gui.
2335 Posts
Microsoft
Jan 31, 2012 12:20 AM|LINK
Hi,
You can take use the follow PS command line for these tasks:
add-WebConfiguration /system.webServer/handlers -Value @{name="SSIforHtml"; path="*.html"; modules="ServerSideIncludeModule"; verb="GET,POST"; } -PSPath "IIS:\sites\Default Web Site\testfolder"
set-WebConfiguration '/system.webServer/handlers/add[@name="SSIforHtml"]' -Value @{ resourceType="File" } -PSPath "IIS:\sites\Default Web Site\testfolder"
clear-WebConfiguration '/system.webServer/handlers/add[@name="SSIforHtml"]' -PSPath "IIS:\sites\Default Web Site\testfolder"
Hope this helps, thanks.
Feb 07, 2012 11:28 AM|LINK
Hi Lloydz,
Thank you very much, you are my man! That's exactly what I was looking for.
regards,
Walter
walter.lohma...
6 Posts
Configure Servicer Side Includes with Power Shell
Jan 25, 2012 02:48 PM|LINK
Hi guys,
I am just trying to configure our IIS completely through Power Shell.
But at the moment I really have now idea how to add, alter and delete Server Side Includes in IIS through Powershell?
I try to do this with the following parameters:
vhost_name Default Web Site
ssi_extension .html
directory /testfolder
can anyone help me please?
thanks a lot!
kctt
654 Posts
Re: Configure Servicer Side Includes with Power Shell
Jan 27, 2012 05:36 AM|LINK
I think SSI is supported by default for extension .shtml
If you have access to IIS manager, check setting of .shtml extension.
walter.lohma...
6 Posts
Re: Configure Servicer Side Includes with Power Shell
Jan 27, 2012 10:13 AM|LINK
you are right, but I try to change that settings using powershell, not the gui.
Lloydz
2335 Posts
Microsoft
Re: Configure Servicer Side Includes with Power Shell
Jan 31, 2012 12:20 AM|LINK
Hi,
You can take use the follow PS command line for these tasks:
add-WebConfiguration /system.webServer/handlers -Value @{name="SSIforHtml"; path="*.html"; modules="ServerSideIncludeModule"; verb="GET,POST"; } -PSPath "IIS:\sites\Default Web Site\testfolder"
set-WebConfiguration '/system.webServer/handlers/add[@name="SSIforHtml"]' -Value @{ resourceType="File" } -PSPath "IIS:\sites\Default Web Site\testfolder"
clear-WebConfiguration '/system.webServer/handlers/add[@name="SSIforHtml"]' -PSPath "IIS:\sites\Default Web Site\testfolder"
Hope this helps, thanks.
walter.lohma...
6 Posts
Re: Configure Servicer Side Includes with Power Shell
Feb 07, 2012 11:28 AM|LINK
Hi Lloydz,
Thank you very much, you are my man!
That's exactly what I was looking for.
regards,
Walter