# What is limit on Invoke-SQL -MaxCharLength parameter

**URL:** <https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394>\
**Category:** PowerShell Help\
**Created:** [January 18, 2023, 5:26pm UTC](https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394 "2023-01-18T17:26:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mg2017](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mg2017](https://forums.powershell.org/u/mg2017)\
**Post date:** [January 18, 2023, 5:26pm UTC](https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394/1 "2023-01-18T17:26:27Z")

</div>

Can someone tell me what the maximul size limit that can be entered for the -MaxCharLength parameter for Invoke-SQL?  
Thx Mark

---

<div class="post-metadata">

**Author:** ![matt-bloomfield](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@matt-bloomfield](https://forums.powershell.org/u/matt-bloomfield)\
**Post date:** [January 18, 2023, 5:49pm UTC](https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394/2 "2023-01-18T17:49:25Z")

</div>

Parameter type is `Int32` so the maximum value will be 2,147,483,647.

---

<div class="post-metadata">

**Author:** ![mg2017](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mg2017](https://forums.powershell.org/u/mg2017)\
**Post date:** [January 18, 2023, 5:55pm UTC](https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394/3 "2023-01-18T17:55:51Z")

</div>

Hi Matt,  
Thanks. yes I accept that as fact but I am curious if there is any internal functional limitation of putting something in that big.  
MG

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/what-is-limit-on-invoke-sql-maxcharlength-parameter/21394/4 "2024-02-10T17:34:05Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
