Currently browsing tag

WebAdministration

Create-Website

Question: What’s the best way to have standardized websites accross server(s)?
Answer: Using a script to create them! Thus, all websites will meet the same standards

In this example, the only mandatory parameter is the website display name. All others have default values, but the script will list them and ask confirmation before creating the website.
Furthermore, a selection of the IP address to use is required (yes, a webserver can have multiple IP address configured, I hope so by the way, at least two -one for the admin network-).

Add-SSLCertificate

Installs a .pfx file Function Add-SSLCertificate{ param([string]$pfxPath,[string]$pfxPassword,[string]$HostHeader,[string]$Website) Import-Module “WebAdministration” -ErrorAction Stop $certMgr = New-Object -ComObject IIS.CertObj -ErrorAction SilentlyContinue $certMgr.ImportToCertStore($PfxPath,$PfxPassword,$true,$true) New-WebBinding -Name $Website …

Get-CentralW3Clogging

Determine if Central W3C logging is ‘per site’ or ‘per server’ Import-Module WebAdministration $LogConfig = Get-WebConfigurationProperty “</code>system.applicationHost/log<code>” -name </code><code>centralLogFileMode if ($LogConfig -eq …

Scroll to Top