View Complete Thread
  • Re: RELIABLE iterative search-and-update of password for service account used in IIS:\\SITES

    Aug 28, 2019 08:20 AM|tmsatgmail|LINK


    Thanks but as I said, I don't have problems with updating App Pool identities. The issue is with a routine that has to update credentials in other places as well e.g. where they've been assigned to virtual directories, sub-folders - I've tried every code snippet going, blogs, even "tried and tested" wrapper functions from elsewhere, but the results have been extremely inconsistent.

    For example, on some tests I can update the password at the top level of the site - but subfolders and other objects below it don't get updated.

    I have had no trouble writing scripts to cover other password updates. With DCOM, for example, I've used documented code samples with WMI to read values, and I use binaries based on code samples in the Windows SDK to perform the write actions. That isn't even the most complex of workflows.

    So I'm actually quite surprised that I'm forced to ask this question with IIS - if anything, a function that updates a credential "anywhere that it is configured in IIS e.g. within IIS sites, app pools and folders" ought to be (on paper) one of the simplest PowerShell functions to write. It's turning out to be the most difficult.