Doesn't look that much different or arcane to how you'd do it in Linux.
Except more structured (which is good).
>What did I just modify? Is it persisted to the hard disk? How do i back that up? How do I revert the change? How do I move this change (and 20 others) from one server to another?
Oh, the humanity of learning a different way of doing things.
IIS:\>New-WebBinding -Name "Default Web Site" -IPAddress "*" -Port 80 -HostHeader TestSite
https://technet.microsoft.com/en-us/library/ee790599.aspxWouldn't it be, for his example of changing the port:
Set-WebBinding -Name 'RadWebServer' -IPAddress "*" -Port 443 -PropertyName Port -Value 4430
I don't have a huge amount of PowerShell experience so maybe that's incorrect or has extra bits.By the way, please stop. I'm having SMIT flashbacks.
Oh, god, the running man. Don't trip, donttripdonttripdontripdontrip...
If you want to become a systems administrator of Windows servers then I'd suggest reading at least one book on the subject, you're not going to get there by copying and pasting one command you found on the internet.
Just as it is with linux/unix. Just as it is with anything.
Pretending otherwise is disingenuous and intellectually dishonest.
IIS has its' own set of commands that you may be more comfortable with, appcmd is sorta like apachectl (just more verbose). http://www.iis.net/learn/get-started/getting-started-with-ii....
The other place you see providers in use is when you use PS to edit the registry, but it's HKLM:\ (or whatever other hive) instead of IIS:\, and it makes a lot more sense there since people naturally think of the registry in a filesystem sort of way.
More info if you're curious about providers:
https://technet.microsoft.com/en-us/%5Clibrary/Ee126186(v=VS...
What these generally do is parse the entire configuration file into an abstract syntax tree, apply the modifications you have asked for to the tree, then serialize the result back into the configuration file format. This ensures that the input and the output are both at least syntactically valid; as a result it is less error-prone than sed/awk. Unlike with configuration file templates (e.g., Ansible's Jinja2 templates) the changes can be applied on top of the distribution's default configuration if desirable and reapplied when that default configuration is updated.
IP Address:Port:Virtual Host
For example: 172.16.1.1:80:www.example.com
The raw values reside in an XML config file called "applicationHost.config" which replaces the old school and rather opaque IIS6 metabase.Admittedly that example is a bit old school, there's better commandlets available now that wrap having to manipulate these string values directly. e.g. the New-WebBinding and Set-WebBinding examples shown in sibling comments in this sub-thread.
A site config looks like:
<site name="MyWebSite" id="3" serverAutoStart="true">
<application path="/" applicationPool="MyWebSite">
<virtualDirectory path="/" physicalPath="D:\websites\mywebsite\www" />
</application>
<bindings>
<binding protocol="http" bindingInformation="172.16.1.1:80:example.com" />
<binding protocol="http" bindingInformation="172.16.1.1:80:www.example.com" />
<binding protocol="https" bindingInformation="172.16.1.:443:" />
</bindings>
</site>
None of this is particularly mysterious, and the documentation is pretty good.
What did I just modify? Is it persisted to the hard disk? How do i back that up? How do I revert the change? How do I move this change (and 20 others) from one server to another? It's three months later, and I want to do something similar, where can I find the current state of DemoSite and mimic it for DevSite?
I like plain text. Clearly companies succeed on microsoft products and people make money administering them. Doesn't mean I have to like it.