SOLVED
Home

Get-Msol cmdlets deprecated already?

%3CLINGO-SUB%20id%3D%22lingo-sub-115218%22%20slang%3D%22en-US%22%3EGet-Msol%20cmdlets%20deprecated%20already%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-115218%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20several%20scripts%20that%20were%20created%20using%20the%20the%20v1%20AzureAD%20PowerShell%20modules.%20Recently%20I%20have%20encountered%20a%20tenant%20that%20is%20failing%20on%20a%20particlar%20cmdlet.%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20running%20Get-MsolCompanyInformation%20on%20the%20problematic%20tenant%20I%20receive%20the%20following%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-Msolcompanyinformation%20-TenantId%26nbsp%3B%7Btenantid%7D%20-%20The%20version%20of%20the%20Microsoft%20Online%20Services%20Module%20that%20you%20are%20using%20is%20no%20longer%20supported.%20Download%20the%20latest%20version%20at%20%3CA%20href%3D%22https%3A%2F%2Fportal.microsoftonline.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fportal.microsoftonline.com%3C%2FA%3E.%3C%2FP%3E%3CP%3EThis%20causes%20my%20script%20to%20ciese%20from%20working%2C%20which%20is%20not%20good.%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20I%20have%20only%20seen%20this%20issue%20with%20a%20tenant.%20I%20have%20not%20been%20able%20to%20reproduce%20this%20problem%20with%20other%20tenants.%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20questions%20I%20have%20are%3A%3C%2FP%3E%3CP%3E1.%20Are%20the%20v1%20cmdlets%20being%20deprecated%20soon%20or%20are%20already%20in%20the%20process%20of%20doing%20so%3F%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20How%20is%20the%20cmdlet%20deprecation%20applied%3F%20Does%20this%20only%20effect%20new%20tenants%3F%20CSP%20tenants%3F%20A%20certain%20license%20type%20in%20the%20tenant%3F%26nbsp%3B%3C%2FP%3E%3CP%3E3.%20If%20the%20v1%20cmdlets%20are%20being%20deprecated%2C%20will%20tenants%20no%20longer%20respond%20to%20any%20of%20Msol%20cmdlets%3F%20(Do%20I%20need%20to%20rewrite%20my%20scripts%20with%20v2%20cmdlets)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20guys!%20%3A)%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-115218%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%20Commands%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%20Reference%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-117982%22%20slang%3D%22en-US%22%3ERe%3A%20Get-Msol%20cmdlets%20deprecated%20already%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-117982%22%20slang%3D%22en-US%22%3E%3CP%3EThe%26nbsp%3BMicrosoft%20Online%20Data%20Service%20(MSOL)%20Module%20for%20Windows%20PowerShell%20is%20available%20in%20the%20%3CA%20title%3D%22PowerShell%20Gallery%22%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPowerShell%20Gallery%3C%2FA%3E.%20For%20additional%20PS%20Gallery%20information%2C%20run%20this%20PS%20command%3A%3C%2FP%3E%3CPRE%3EFind-Module%20-Name%20MSOnline%20-Verbose%20-AllVersions%20%7C%20Format-List%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20import%20the%20MSOL%20module%20into%20your%20current%20PS%20session%2C%20run%20this%20PS%20command%3A%3C%2FP%3E%3CPRE%3EImport-Module%20-Name%20MSOnline%20-Force%20-Scope%20Local%20-Verbose%3C%2FPRE%3E%3CP%3EFor%20testing%20in%20my%20PS%20session%2C%20I%20imported%20MSOL%20from%20the%20PS%20Gallery.%20After%20I%20ran%20Connect-MsolService%2C%20the%20Get-MsolCompanyInformation%20cmdlet%20worked%20like%20a%20charm%20with%20or%20without%20the%20tenantID%20specified.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3CP%3ECarnegie%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-115309%22%20slang%3D%22en-US%22%3ERe%3A%20Get-Msol%20cmdlets%20deprecated%20already%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-115309%22%20slang%3D%22en-US%22%3E%3CP%3EI%20just%20downloaded%20the%20latest%20GA%20bits%20here%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fconnect.microsoft.com%2Fsite1164%2FDownloads%2FDownloadDetails.aspx%3FDownloadID%3D59185%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fconnect.microsoft.com%2Fsite1164%2FDownloads%2FDownloadDetails.aspx%3FDownloadID%3D59185%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20connected%20to%20my%20tenant%20and%20Get-MsolCompanyInformation%20works%20fine.%20I'm%20not%20using%20the%20-TenantId%20parameter%20though.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20haven't%20seen%20any%20deprecation%20notice%20for%20this%20module.%20The%20download%20page%20says%20nothing%2C%20and%20the%20docs%20page%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fmsonline%2F%3Fview%3Dazureadps-1.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20only%20says%20they%20encourage%20the%20use%20of%20the%20V2%20module%20instead.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EShould%20you%20rewrite%20scripts%20for%20V2%3F%20Yes%2C%20now%20would%20be%20the%20time%20to%20start%20working%20on%20that%2C%20as%20it's%20not%20always%20a%20simple%20task%20to%20get%20like%20for%20like%20functionality%20as%20some%20of%20the%20new%20module's%20cmdlets%20work%20very%20differently%20to%20the%20old%20ones%20in%20terms%20of%20parameters%2C%20input%2C%20and%20output.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Josh Keefer
New Contributor

I have several scripts that were created using the the v1 AzureAD PowerShell modules. Recently I have encountered a tenant that is failing on a particlar cmdlet. 

When running Get-MsolCompanyInformation on the problematic tenant I receive the following output:

 

Get-Msolcompanyinformation -TenantId {tenantid} - The version of the Microsoft Online Services Module that you are using is no longer supported. Download the latest version at https://portal.microsoftonline.com.

This causes my script to ciese from working, which is not good. 

Also, I have only seen this issue with a tenant. I have not been able to reproduce this problem with other tenants. 

So the questions I have are:

1. Are the v1 cmdlets being deprecated soon or are already in the process of doing so? 

2. How is the cmdlet deprecation applied? Does this only effect new tenants? CSP tenants? A certain license type in the tenant? 

3. If the v1 cmdlets are being deprecated, will tenants no longer respond to any of Msol cmdlets? (Do I need to rewrite my scripts with v2 cmdlets)

 

Thanks guys! :) 

2 Replies
Solution

I just downloaded the latest GA bits here:

 

http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185

 

It connected to my tenant and Get-MsolCompanyInformation works fine. I'm not using the -TenantId parameter though.

 

I haven't seen any deprecation notice for this module. The download page says nothing, and the docs page here only says they encourage the use of the V2 module instead.

 

Should you rewrite scripts for V2? Yes, now would be the time to start working on that, as it's not always a simple task to get like for like functionality as some of the new module's cmdlets work very differently to the old ones in terms of parameters, input, and output.

The Microsoft Online Data Service (MSOL) Module for Windows PowerShell is available in the PowerShell Gallery. For additional PS Gallery information, run this PS command:

Find-Module -Name MSOnline -Verbose -AllVersions | Format-List

 

To import the MSOL module into your current PS session, run this PS command:

Import-Module -Name MSOnline -Force -Scope Local -Verbose

For testing in my PS session, I imported MSOL from the PS Gallery. After I ran Connect-MsolService, the Get-MsolCompanyInformation cmdlet worked like a charm with or without the tenantID specified.

 

 

Kind regards,

Carnegie

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies