Skip to content

Commit 90ac053

Browse files
Added quotes around parameters (#20173)
1 parent 8cc401d commit 90ac053

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

aspnetcore/host-and-deploy/windows-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ Use PowerShell commands to register a service. From an administrative PowerShell
153153

154154
```powershell
155155
$acl = Get-Acl "{EXE PATH}"
156-
$aclRuleArgs = {DOMAIN OR COMPUTER NAME\USER}, "Read,Write,ReadAndExecute", "ContainerInherit,ObjectInherit", "None", "Allow"
156+
$aclRuleArgs = "{DOMAIN OR COMPUTER NAME\USER}", "Read,Write,ReadAndExecute", "ContainerInherit,ObjectInherit", "None", "Allow"
157157
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($aclRuleArgs)
158158
$acl.SetAccessRule($accessRule)
159159
$acl | Set-Acl "{EXE PATH}"
160160
161-
New-Service -Name {SERVICE NAME} -BinaryPathName {EXE FILE PATH} -Credential {DOMAIN OR COMPUTER NAME\USER} -Description "{DESCRIPTION}" -DisplayName "{DISPLAY NAME}" -StartupType Automatic
161+
New-Service -Name {SERVICE NAME} -BinaryPathName "{EXE FILE PATH}" -Credential "{DOMAIN OR COMPUTER NAME\USER}" -Description "{DESCRIPTION}" -DisplayName "{DISPLAY NAME}" -StartupType Automatic
162162
```
163163

164164
* `{EXE PATH}`: Path to the app's folder on the host (for example, `d:\myservice`). Don't include the app's executable in the path. A trailing slash isn't required.

0 commit comments

Comments
 (0)