Powershell Studio using "older" Module than local powershell.exe

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Kai Schneider
Posts: 1
Last visit: Fri Nov 24, 2023 1:15 am

Powershell Studio using "older" Module than local powershell.exe

Post by Kai Schneider »

Hello Scripting people,

in Powershell Studio im using the MicrosoftTeams-Module.
On my local machine (powershell.exe) i had install the newest prerelease of MicrosoftTeams with following command:

Code: Select all

Install-Modul -Name MicrosoftTeams -AllowPrerelease -RequiredVersion "2.2.0-preview"
It worked fine and i can use the new Cmdlets, for example Add-TeamChannelUser.

In Powershell Studio its only working in the Console. In my Script it doenst know the Add-TeamChannelUser command.
Also the parameter "-allowprerelease" for the Install-Module command is not found.
I tried reboot, Chache update and Cache Editor, but it doenst solve my issue...

Do you have any ideas to solve my problem ?

Best regards
by brittneyr » Thu Apr 22, 2021 2:11 pm
Are you importing the MicrosoftTeams module in your script? Also make sure that module is listed in the Object Browser panel:
SPS_ObjectBrowserPane.png
As for the other issue, Install-Module is from the PowerShellGet module. What version of PowerShellGet do you have installed? If you have more than one version installed, make sure you the latest one is checked in the Cache Editor:
SPS_CacheEditor.png
After rebuilding or making changes to the cache, the cache needs to be reloaded or the application needs to be restarted:
SPS_RibbonReloadCache.png
Go to full post
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Powershell Studio using "older" Module than local powershell.exe

Post by brittneyr »

Are you importing the MicrosoftTeams module in your script? Also make sure that module is listed in the Object Browser panel:
SPS_ObjectBrowserPane.png
SPS_ObjectBrowserPane.png (23.62 KiB) Viewed 4128 times
As for the other issue, Install-Module is from the PowerShellGet module. What version of PowerShellGet do you have installed? If you have more than one version installed, make sure you the latest one is checked in the Cache Editor:
SPS_CacheEditor.png
SPS_CacheEditor.png (40.25 KiB) Viewed 4128 times
After rebuilding or making changes to the cache, the cache needs to be reloaded or the application needs to be restarted:
SPS_RibbonReloadCache.png
SPS_RibbonReloadCache.png (20.95 KiB) Viewed 4128 times
Brittney
SAPIEN Technologies, Inc.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.