Skip to content

Commit 255be17

Browse files
committed
Add SetSiteConnectAs to createWebsite.ps1
1 parent 54a94d3 commit 255be17

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

build.cake

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using System.Text.RegularExpressions;
66
var target = Argument("target", "Default");
77
var configuration = Argument("configuration", "Release");
88

9-
var baseVersion = "1.26.0";
9+
var baseVersion = "1.27.0";
1010
var subVersion = "";
1111
var subVersionNumber = "";
1212
var isMasterOrDevelop = false;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: createWebsite.ps1 - SetSiteConnectAs
3+
linkText: SetSiteConnectAs
4+
description: Details about the SetSiteConnectAs function in createWebsite.ps1 helper script
5+
---
6+
7+
# StartAppPool
8+
9+
```PowerShell
10+
{% raw %}
11+
SetSiteConnectAs
12+
[-name] <String>
13+
[-username] <String>
14+
[-password] <String>
15+
{% endraw %}
16+
```
17+
18+
## Description
19+
20+
Sets the site to connect to the file system as a dedicated user
21+
22+
## Example
23+
24+
```PowerShell
25+
{% raw %}
26+
SetSiteConnectAs -name "MySite" -username "MyUser" -password "5ecureP@ssw0rd
27+
{% endraw %}
28+
```

src/Scripts/createWebSite.ps1

+6
Original file line numberDiff line numberDiff line change
@@ -679,5 +679,11 @@ function SetAppPoolAlwaysRunning([string] $appPoolName)
679679
Set-ItemProperty IIS:\AppPools\$appPoolName processModel.idleTimeout "00:00:00"
680680
}
681681

682+
function SetSiteConnectAs([string] $name, [string] $userName, [string] $password)
683+
{
684+
Set-ItemProperty IIS:\Sites\$name -name userName -value $userName
685+
Set-ItemProperty IIS:\Sites\$name -name password -value $password
686+
}
687+
682688
Write-Host "Ensconce - CreateWebsite Loaded"
683689
$createWebSiteLoaded = $true

0 commit comments

Comments
 (0)