10 Tips for the SQL Server PowerShell Scripter | Scripting ...
Invoke-Sqlcmd : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. So, you’ll need to specify a query timeout. In SQL Server 2012, the bug was partially fixed and you can specify 0, which means no QueryTimeout:
DA: 71 PA: 42 MOZ Rank: 5