Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Add Lync License To Multiple users

$
0
0

Hi

All our users are Licensed for Office365  for EXCHANGESTANDARD.

The company has recently added Lync services.

We several groups of users who need to be licensed for Lync (MCOSTANDARD).

I exported the users from each OU to a CSV file using their UPN. Here is the script that created;

"Import-Csv .\Group1.csv | ForEach_Object

{

$userprincipalname = $_.userprincipalname

(Get-MsolUser -UserPrincipalName $userprincipalname).Licenses[0].ServiceStatus

Set-MsolUserLicense -UserPrincipalName $userprincipalname -AddLicense "tenant:MCOSTANDARD"

}

When I ran the script in ISE the following came up at the prompt;

cmdlet ForEach_Object at command pipeline position 2

Supply values for the following parameter:

Process[0]:

I pressed the ENTER key the entire script output to the screen as  if ran successfully but when I verify the license has not been assigned to the users.

I am new to powershell and will like your help

Thanks

Bish


Viewing all articles
Browse latest Browse all 21975

Trending Articles