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
Describe the bug
Running power shell scripts using imports do not work in PowerShell 7.x only 5.1. The following works fine on the same machine in 5.1 but not 7.x.
The term 'Connect-ServiceFabricCluster' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a
| path was included, verify that the path is correct and try again.
Service Fabric Runtime Version:
Microsoft Azure Service Fabric 8.2.1571.9590
Microsoft Azure Service Fabric SDK 5.2.1571.9590
Environment:
Microsoft Windows 10 Enterprise
Version 10.0.19044 Build 19044
System Type x64-based PC
Additional context
PowerShell 7.x is coming directly from the Windows Store. Running these in VS Code terminals.
Version: 1.66.2 (system setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19044
Assignees: /cc @microsoft/service-fabric-triage
The text was updated successfully, but these errors were encountered:
Thanks @dacken. Not the out of the box experience I was hoping for but in case someone else has the same issue I have added the Import-Module ServiceFabric -UseWindowsPowerShell to my Powershell profile so it essentially does exactly what I need. Just do the following:
PS> code $PROFILE
Add Import-Module ServiceFabric -UseWindowsPowerShell to the file and save.
Each time a PS session starts it will run that statement.
Describe the bug
Running power shell scripts using imports do not work in PowerShell 7.x only 5.1. The following works fine on the same machine in 5.1 but not 7.x.
Area/Component:
SDK with PowerShell 7.x
To Reproduce
Steps to reproduce the behavior:
Test two
Get-Command *ServiceFabricCluster* -All
Get-Command *ServiceFabricCluster* -All
Notice 5.1 has all the expected commands and 7.x does not.
Expected behavior
In 5.1
Observed behavior:
Service Fabric Runtime Version:
Microsoft Azure Service Fabric 8.2.1571.9590
Microsoft Azure Service Fabric SDK 5.2.1571.9590
Environment:
Additional context
PowerShell 7.x is coming directly from the Windows Store. Running these in VS Code terminals.
Version: 1.66.2 (system setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19044
Assignees: /cc @microsoft/service-fabric-triage
The text was updated successfully, but these errors were encountered: