is there an example of setting the Identity in IIS for a Custom User in an Application Pool using command line or powershell script?
Setup IIS Identity in an ApplicationPool using cmd or ps1
1.9k Views Asked by kyriakak71 At
2
There are 2 best solutions below
0
dxking
On
Should be able to do something like this:
Set-ItemProperty -Path "IIS:\AppPools\$AppPoolName" -Name processModel -Value @{userName=$AppPoolUser;password=$AppPoolUserPw;identitytype=3}
See documentation for processModel here: https://learn.microsoft.com/en-us/iis/configuration/system.applicationHost/applicationPools/add/processModel#configuration
Related Questions in POWERSHELL
- PowerShell Linphone Configuration
- How avoid \t being converted to Tab in Powershell
- How do I get my terminal to work in VS Code? Exit Code:2, doesn't allow me to type anything
- Npm command not working in powershell but works in cmd
- Issue with path not being treated as encapsulated when calling cmd /C
- Native command throws error only when I redirect to a variable
- Logic Apps and long running Azure Function (Powershell)
- April fools - PsExec (PsTools)
- How to use nested ForEach-Object
- Batch Script-Powershell MessageBox | How do I set TopMost within PS command line of Batch?
- Execution Stuck at Get-PnPPage if function executed on Button Click
- How can I expand a column from group output?
- How to use expression in regex -replace with capturing group in powershell
- powershell where-object -cnotmatch filter unwanted lines
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
Related Questions in IIS
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- IIS Rewrite Module exclude bots but allow GoogleBot
- How to deploy angular 17 SSR into IIS
- IIS web site with httpplatformhandler on specific route does not redirect to the nextjs site
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
- Primeng Angular styles on subdomain don't work
- Apps migrated from IIS server1 to another IIS server2 stopped communicating with an App on IIS server 1 via SSL (HTTPS)
- How to authenticate with REST API service on IIS using pass-through authentication in Python?
- ASP.NET Core 8 is missing from application pool selection after install
- Azure Application Gateway ByPass
- SSL certificate is installed on iis and website but in browser is unknown
- Redirect to another site but show the original URL in browser
- Problem in hosting React App with react-router-dom on IIS Server
- Django Channels on IIS
- ASP.NET Core/Angular17 application files does not load when published in IIS
Related Questions in APPLICATION-POOL
- Debugging multiple web application within one IIS Express site
- Application pool recycle cause bug with duplication of collection items. Blazor server .net6 app hosted in windows Azure app service
- Expected App Pool is not showing. Instead of that Generic App Pool is showing
- IIS - Assign a custom count to an application pool : Windows user password "invalid"
- Is there any way to know why an application pool in IIS has restarted?
- How is computed the private memory limit with multiple worker process on IIS?
- How to ensure COM+ Application Pools are always running
- How to automatically set the Application Pool Identity, User Name & Password
- How to resolve 'recycle IIS application pool error in vbScript website'?
- Application Pool in IIS errors out when attempting to start automatically after a reboot
- IIS App Pool Crashing when App Pool User connects to fileshare
- App Pool connection to SQL Server using Azure AD auth
- How to find cause of IIS shutting down an app pool after only a minute or so
- App Pool Issues and Website redirecting back to login after successful login
- IIS Website intermittently going down and coming back up
Related Questions in APPLICATIONPOOLIDENTITY
- .Net API in IIS (Azure VM) not browsing
- Different AppPoolIdentities for App and Reverse Proxy - IIS Out-Of-Process Hosting?
- How to automatically set the Application Pool Identity, User Name & Password
- Setup IIS Identity in an ApplicationPool using cmd or ps1
- from web.config to IIS Application Pool Identities
- How to get Windows loggedin username in IIS defind anonymous + windows authentication
- How to make IIS use AppPool Identity to connect to SQL Server instead of NT Authority\IUSR?
- Trouble using gMSA on IIS pool identity
- Apply Windows authentication on ASP.NET core 2.2 published site without getting chrome Sign in dialog box
- 401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials
- How to Upload File using Application Pool identity instead of Logged User Identity- ASP.NET MVC Impersonation
- HTTP error 503. service unavailable when trying to run local host
- Tesseract only works when Application Pool Identity in IIS is set to Local System
- Authenticate Web App using Application Pool
- IIS application pool - retry after pool identity login fails
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can use the following appcmd.exe command line to set an identity in IIS for a custom user in the applicationpool.
Here is my test steps and result:
1.Run cmd as administrator
2.Change directory to the location where appcmd.exe resides (c:\windows\system32\inetsrv):
cd %WINDIR%\system32\inetsrv3.Then enter the appcmd.exe command line, you need to replace the content in the red box.
4.Then you can see that the application pool identity is successfully set as a custom account.
Hope my answer can help you!