How to automate adding IIS Bindings and Host base on Sitecore sites configuration files. Repo - http://bit.ly/2hllIMQ, Powershell Gallery http://bit.ly/2i6Oqnj
Powerful Google developer tools for immediate impact! (2023-24 C)
Use case 1 - for Sitecore Automation Module
1. @RobsonAutomator
HOW TO ADD PLENTY IIS BINDINGS & HOSTS ENTRIES IN SECOND
SITECORE
SITES
CONFIGURA
TION
IIS
BINDINGS
HOSTS
FIles
SITECORE
AUTOMATION
MODULE
https://bitbucket.org/sitecoreautomationteam/sitecore-automation/wiki/Home
2. @RobsonAutomator
Use Case for Sitecore Automation Module
Migration of 4 servers SIT/CM/2xCD
https://bitbucket.org/sitecoreautomationteam/sitecore-automation/wiki/Home
3. @RobsonAutomator
Use Get-SitecoreSites command and extract hostName property
Get Sitecore Sites
$webPath = 'E:wwwMySiteWebsiteApp_ConfigIncludeNovo'
$hosts = Get-SitecoreSites -Path $webPath | Select-Object -
ExpandProperty hostName
https://bitbucket.org/sitecoreautomationteam/sitecore-automation/wiki/Home
4. @RobsonAutomator
Add IIS Bindings
Use Add-SitecoreBindings to add hosts to IIS
Add-SitecoreBindings -Hosts $hosts -WebSite "Sitecore8"
https://bitbucket.org/sitecoreautomationteam/sitecore-automation/wiki/Home
5. @RobsonAutomator
Add Hosts Entries
Use New-SitecoreHostEntry to add entries to hosts file
foreach($hostName in $hosts)
{
New-SitecoreHostsEntry -IpAddress 127.0.0.1 -HostName $hostName
New-SitecoreHostsEntry -IpAddress 255.255.255.255 -HostName $hostName
-Path $devhosts
}
https://bitbucket.org/sitecoreautomationteam/sitecore-automation/wiki/Home