Code colouring not working properly after here-string in Invoke-Command
Posted: Tue Jul 02, 2019 5:33 pm
Product, version and build: SAPIEN PowerShell Studio 2019 Version 5.6.165
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 Pro 1903
32 or 64 bit OS: 64-bit
I'm modifying some code to have a SQL query within the Invoke-Command block, and once I've done that, colouring of code after that seems to think it's still inside the string. Also, if I hover my mouse over the mis-coloured text, it tells me it's System.String, rather than cmdlet, parameter, etc. See attached screenshot for example; you can see the properly coloured code before it, and then after the here-string, it's all orange strings:
If I move the here-string to outside the Invoke-Command block, it handles it properly. Also, still within the Invoke-Command block, it suddenly starts working properly again:
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 Pro 1903
32 or 64 bit OS: 64-bit
I'm modifying some code to have a SQL query within the Invoke-Command block, and once I've done that, colouring of code after that seems to think it's still inside the string. Also, if I hover my mouse over the mis-coloured text, it tells me it's System.String, rather than cmdlet, parameter, etc. See attached screenshot for example; you can see the properly coloured code before it, and then after the here-string, it's all orange strings:
If I move the here-string to outside the Invoke-Command block, it handles it properly. Also, still within the Invoke-Command block, it suddenly starts working properly again: