Consistent means of getting IIS configuration

This topic contains 3 replies, has 4 voices, and was last updated by Profile photo of Stefan Werner Stefan Werner 5 months, 1 week ago.

  • Author
    Posts
  • #44679
    Profile photo of John Provencher
    John Provencher
    Participant

    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.

  • #44692
    Profile photo of Don Jones
    Don Jones
    Keymaster

    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)

  • #44740
    Profile photo of John Provencher
    John Provencher
    Participant

    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.

  • #44760
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    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.

You must be logged in to reply to this topic.