# Get-WebConfiguration: Commit Path contains one or more invalid characters

**URL:** <https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459>\
**Category:** PowerShell Help\
**Created:** [April 19, 2017, 1:10pm UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459 "2017-04-19T13:10:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebredmond](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@ebredmond](https://forums.powershell.org/u/ebredmond)\
**Post date:** [April 19, 2017, 1:10pm UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459/1 "2017-04-19T13:10:55Z")

</div>

I am trying to enumerate through a number of web sites defined on an IIS server and get some configuration information on that site. However whenever it encounters a website with a parenthesis it gives the following error.

```
Get-WebConfiguration : Commit path contains one or more invalid characters.
```

My Google-fu is failing me.

Any thoughts as to why this might be. I have tried encoding the parenthesis but to no avail.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [April 24, 2017, 8:20am UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459/2 "2017-04-24T08:20:35Z")

</div>

Yeah, that’s kind of a thing with IIS and is basically a bug in the module. The answer is, “don’t use parentheses in site names.”

---

<div class="post-metadata">

**Author:** ![ebredmond](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@ebredmond](https://forums.powershell.org/u/ebredmond)\
**Post date:** [April 25, 2017, 4:45am UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459/3 "2017-04-25T04:45:10Z")

</div>

I was afraid that would be the response. ☹

Thanks, Don.

---

<div class="post-metadata">

**Author:** ![ebredmond](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@ebredmond](https://forums.powershell.org/u/ebredmond)\
**Post date:** [May 3, 2017, 8:09am UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459/4 "2017-05-03T08:09:12Z")

</div>

I found a workaround for this issue. Instead of using the Get-WebConfiguration cmdlet, you need to use the Get-WebConfigurationProperty cmdlet.

So instead of using

```
Get-WebConfiguration "/system.webServer/security/dynamicIpSecurity/denyByConcurrentRequests" -PSPath "IIS:\Sites\somesitename"
```

You can use

```
Get-WebConfigurationProperty -filter "/system.webServer/security/dynamicIpSecurity/denyByConcurrentRequests" -PSPath "IIS:\Sites\somesitename" -name "*"
```

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:38pm UTC](https://forums.powershell.org/t/get-webconfiguration-commit-path-contains-one-or-more-invalid-characters/8459/5 "2024-05-16T20:38:50Z")

</div>


