# Consistent means of getting IIS configuration

**URL:** <https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706>\
**Category:** PowerShell Help\
**Created:** [June 24, 2016, 9:57am UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706 "2016-06-24T09:57:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![john-provencher](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@john-provencher](https://forums.powershell.org/u/john-provencher)\
**Post date:** [June 24, 2016, 9:57am UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706/1 "2016-06-24T09:57:31Z")

</div>

Is there a (consistent) way to get IIS configuration information? Specifically, log file location.  
Using ADSI works if IISAdmin is installed and running, which isn’t always the case.

I found a way to get the information from applicationhost.config by loading it into an XML object and getting it from $xml.configuration.‘system.applicationhost’.sites.site. BUT, the logfile.directory path isn’t always there, but can be seen through ADSI if IISAdmin is running. Theoretically, the configuration for all sites on the server would be in applicationhost.config, right? I’m also trying to figure out the location of the FTP logs, if the server is running FTPSvc.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [June 24, 2016, 10:55am UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706/2 "2016-06-24T10:55:40Z")

</div>

Is it anywhere in the IIS: drive, if you’ve got WebAdministration loaded?

(I would have looked at XML, too, although not just applicationhost.config, but also the other .config files in the hierarchy)

---

<div class="post-metadata">

**Author:** ![john-provencher-2](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@john-provencher-2](https://forums.powershell.org/u/john-provencher-2)\
**Post date:** [June 24, 2016, 12:01pm UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706/3 "2016-06-24T12:01:56Z")

</div>

We also don’t have PSRemoting enabled across the board, and it is currently a matter of contention. I’m trying to get it enabled so that I can force check for/install of updates via Invoke-PSSession. - The environment I work in is highly restrictive (Department of Defense). There is a lot of jumping through hoops to get things done, or just find a way. I guess I can try to find the directory where the site is homed and look for a web.config. That may give me what I need.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [June 24, 2016, 1:20pm UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706/4 "2016-06-24T13:20:32Z")

</div>

While there are certainly differences in policy between agencies, there isn’t anything that I am aware of from DISA (and in my case the Air Force) that prohibits the use of PowerShell Remoting on the DoDIN.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:41pm UTC](https://forums.powershell.org/t/consistent-means-of-getting-iis-configuration/6706/5 "2024-05-16T20:41:18Z")

</div>


