You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
PSVersion 5.1.18362.145
BuildVersion 10.0.18362.145
Windows Terminal version 0.6.2951.0
In addition to trying the ootb PowerShell experience, I've added in a profile matching my SharePoint Online Management Shell shortcut (other than the GUID which I just modified from the standard PS one). Behaviour below replicated in both windows/environments.
Fairly simple really, I have a variable assignment in PowerShell that breaks over multiple lines for readability, but PS in Terminal interprets as multiple commands.
I completely accept there may be a simple modification to the way I've been doing it that'll make it work in PS as delivered by Windows terminal. Problem may be sitting between chair and keyboard.
and with single backticks after each line (edit: as Quotes are designated by backticks, they've been stripped from this code entry, but they were there, and produce the same result
$MyDocs = [environment]::getfolderpath("mydocuments")
In my regular PowerShell console and in SharePoint Online Management Console it assigns a variable with a collection of paths, which can be iterated through with foreach.
Actual behavior
Interpreted as a series of incomplete commands, 1 per line.
Can of course be mitigated by replacing all commands broken over multiple lines with the same commands on a single line, so not P0, but fairly annoying, as I have quite a few, including a giant if() statement
Tags
#PowerShell
The text was updated successfully, but these errors were encountered:
ghost
added
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Needs-Tag-Fix
Doesn't match tag requirements
labels
Nov 4, 2019
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
ghost
added
Resolution-Duplicate
There's another issue on the tracker that's pretty much the same thing.
and removed
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Needs-Tag-Fix
Doesn't match tag requirements
labels
Nov 4, 2019
Environment
Windows 10, PS 6, Windows Terminal.
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
PSVersion 5.1.18362.145
BuildVersion 10.0.18362.145
Windows Terminal version 0.6.2951.0
In addition to trying the ootb PowerShell experience, I've added in a profile matching my SharePoint Online Management Shell shortcut (other than the GUID which I just modified from the standard PS one). Behaviour below replicated in both windows/environments.
{ "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bc}", "name": "SPO PowerShell", "commandline": "powershell.exe -NoExit -Command \"Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking;\" ", "hidden": false },
Steps to reproduce
Fairly simple really, I have a variable assignment in PowerShell that breaks over multiple lines for readability, but PS in Terminal interprets as multiple commands.
I completely accept there may be a simple modification to the way I've been doing it that'll make it work in PS as delivered by Windows terminal. Problem may be sitting between chair and keyboard.
I've tried:
$MyDocs = [environment]::getfolderpath("mydocuments")
`
$Dlls = ("$MyDocs\ISAPI16\05Microsoft.SharePoint.Client.Runtime.dll",
"$MyDocs\ISAPI16\02Microsoft.SharePoint.Client.Publishing.dll",
"$MyDocs\ISAPI16\04Microsoft.SharePoint.Client.Taxonomy.dll",
"$MyDocs\ISAPI16\31Microsoft.SharePoint.Security.dll",
"$MyDocs\ISAPI16\09Microsoft.SharePoint.Client.UserProfiles.dll")'
and with single backticks after each line (edit: as Quotes are designated by backticks, they've been stripped from this code entry, but they were there, and produce the same result
$MyDocs = [environment]::getfolderpath("mydocuments")
$Dlls = ("$MyDocs\ISAPI16\05Microsoft.SharePoint.Client.Runtime.dll",
"$MyDocs\ISAPI16\02Microsoft.SharePoint.Client.Publishing.dll",
"$MyDocs\ISAPI16\04Microsoft.SharePoint.Client.Taxonomy.dll",
"$MyDocs\ISAPI16\31Microsoft.SharePoint.Security.dll",`
"$MyDocs\ISAPI16\09Microsoft.SharePoint.Client.UserProfiles.dll")'
Expected behavior
In my regular PowerShell console and in SharePoint Online Management Console it assigns a variable with a collection of paths, which can be iterated through with foreach.
Actual behavior
Interpreted as a series of incomplete commands, 1 per line.
Can of course be mitigated by replacing all commands broken over multiple lines with the same commands on a single line, so not P0, but fairly annoying, as I have quite a few, including a giant if() statement
Tags
#PowerShell
The text was updated successfully, but these errors were encountered: