It will happen that while managing or testing so many web applications we will create many application pool(s) in IIS. So there is possibility that we may forget the password of account we have used for the some of the application pool. In order to retrieve the same we can use APPCMD.Let's Start
Considering the fact that we have dont know or forgot the password of the account that is used by a "Specific User
" application pool.
2. Open the command prompt by browsing Start menu -> Accessories -> Command Prompt. Right click on Command prompt and select "Run as Administrator" option from the context menu.
Tip: You can also select CMD and press CTRL + Shift + Enter to Start Command Prompt as Administrator or with Machine Administrator rights
3. Browse the following path on command prompt "%systemroot%\system32\inetsrv" and run APPCMD list apppool "Specific User" /text:*
mostly it will be C:\Windows\System32\inetsrv
Replace "Specific User" with the App Pool name of which you want to retrieve the password.
4. Under the [processModel] section you will get the username and password which is Clear Text [The credentials shown below are for this example only].
As mentioned above similar to IIS 6.0, where the password for the
application pool was stored in Clear text, so does IIS 7.0 & IIS 7.5
stores it in clear text which you can see from the above example.
And here's where the least-privilege part comes into play for all
those who are running there SharePoint environment with Accounts which
has rights more than needed, as getting the password now is more easy
than it was for IIS 6.0. Finally a word of caution always perform a
least-privileged installation of your SharePoint environment, meaning
the Application Pool account doesn't get more permissions than needed.