PowerShell: Report / Check the Size of ConfigMgr Task Sequences
From the archive (2012). Written for the tools of the time, so some details may be out of date.
Trevor Sullivan has created a nice post on checking the size of your Task Sequence’s. This is useful, since there is a 4mb limit to your TS. If you have too many steps, you can run into this issue.