Skip to content

Commit

Permalink
SetSiteConnectAs to SetSitePathWithConnectAs
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Aug 1, 2024
1 parent de23094 commit 7f69971
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
28 changes: 0 additions & 28 deletions docs/powershell/create-website/set-site-connect-as.md

This file was deleted.

29 changes: 29 additions & 0 deletions docs/powershell/create-website/set-site-path-with-connect-as.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: createWebsite.ps1 - SetSitePathWithConnectAs
linkText: SetSitePathWithConnectAs
description: Details about the SetSitePathWithConnectAs function in createWebsite.ps1 helper script
---

# StartAppPool

```PowerShell
{% raw %}
SetSitePathWithConnectAs
[-name] <String>
[-path] <String>
[-username] <String>
[-password] <String>
{% endraw %}
```

## Description

Sets the site physical path with connect as set to a dedicated user

## Example

```PowerShell
{% raw %}
SetSitePathWithConnectAs -name "MySite" -path "\\remoteshare\folder" -username "MyUser" -password "5ecureP@ssw0rd
{% endraw %}
```
3 changes: 2 additions & 1 deletion src/Scripts/createWebSite.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,11 @@ function SetAppPoolAlwaysRunning([string] $appPoolName)
Set-ItemProperty IIS:\AppPools\$appPoolName processModel.idleTimeout "00:00:00"
}

function SetSiteConnectAs([string] $name, [string] $userName, [string] $password)
function SetSitePathWithConnectAs([string] $name, [string]$path, [string] $userName, [string] $password)
{
Set-ItemProperty IIS:\Sites\$name -name userName -value $userName
Set-ItemProperty IIS:\Sites\$name -name password -value $password
Set-ItemProperty IIS:\Sites\$name -name physicalPath -value $path
}

Write-Host "Ensconce - CreateWebsite Loaded"
Expand Down

0 comments on commit 7f69971

Please sign in to comment.