1 2 3 4 5 | Import-Module SkypeOnlineConnector $userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession Get-CsOnlineUser -Identity "sip:sanjiv.kumar@test.com" |
Monday, March 30, 2020
Check Get-CsOnlineUser users property
Grant-CsTeamsUpgradePolicy to teams only for bulk user from CSV file (upgrade MS teams from Island mode to Teams only)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #http://hilite.me/ # Loop through all the records in the CSV Import-Module SkypeOnlineConnector $userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession $employee_list = Import-Csv 'C:\Temp\skypetoteams\phase1\Skype to Teams Phase-1 users.csv' $Datetime= Get-Date -Format dd_MM_yyyy_HH.mm.ss $LogFileName=([string]::Concat("C:\Temp\skypetoteams\phase1\Log_Skype to Teams Phase-1 users " , $Datetime ,".csv")) New-Item $LogFileName -ItemType file Add-Content $LogFileName -Value ([string]::Concat("User email" +","+ "Current Team upgrade policy")) Write-Host "Getting all user from csv.." foreach ($employee in $employee_list) { $employeeEmail= $employee.Email Write-Host $employeeEmail Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity $employeeEmail $userteampolicy = Get-CSOnlineUser -Identity $employeeEmail| Select TeamsUpgradeEffectiveMode Add-Content $LogFileName -Value ([string]::Concat($($employeeEmail) +","+ $($userteampolicy))) } Write-Host "Completed.." |
Friday, March 27, 2020
Upgrade Microsoft Team policy
1 2 3 4 5 | Import-Module SkypeOnlineConnector $userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity sanjiv.kumar@test.com |
Thursday, March 26, 2020
Set DID numbers for Skype online /Teams users using powershell
1 2 3 4 5 6 | Import-Module SkypeOnlineConnector $userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession Set-CsOnlineVoiceApplicationInstance -Identity test@test.com -TelephoneNumber +9101156787 Get-CsOnlineTelephoneNumber -TelephoneNumber +9101156787 |
Office 365 B2B guest account creation with custom mail message
1 2 3 4 5 6 7 8 9 10 11 12 13 | Install-Module AzureAD Import-Module AzureAD Connect-AzureAD $userName = 'Sanjiv Kumar' $messageInfo = New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo $messageInfo.customizedMessageBody = "Hi " + $userName +", Welcome to Testing Single Sign on Solution – the link enclosed on this email will allow you to access Testing Corporate Applications" New-AzureADMSInvitation -InvitedUserDisplayName 'Sanjiv kumar' -InvitedUserEmailAddress sanjiv.kumar@test.com -InvitedUserMessageInfo $messageInfo -InviteRedirectURL https://domainname.sharepoint.com/SitePages/Home.aspx -SendInvitationMessage $True |
Saturday, January 18, 2020
MFA enabled/disabled users from using Global access policy
Once the reports gets generated, Sort-out the reports based on the "MFA Methods" will provide the report for people registered with MFA or Not.
Get-msoluser -All | Select-Object @{N='UserPrincipalName';E={$_.UserPrincipalName}},
@{N='MFA Status';E={if ($_.StrongAuthenticationRequirements.State){$_.StrongAuthenticationRequirements.State} else {"Disabled"}}},
@{N='MFA
Methods';E={$_.StrongAuthenticationMethods.methodtype}},
@{N='Auth Email';E={$_.StrongAuthenticationUserDetails.email}},
@{N='Auth Phone';E={$_.StrongAuthenticationUserDetails.PhoneNumber}},
@{N='Auth
Device';E={$_.StrongAuthenticationPhoneAppDetails.DeviceName}},
@{N='Alternative
Phone';E={$_.StrongAuthenticationUserDetails.AlternativePhoneNumber}},
@{N='Alternative
Email';E={$_.AlternateEmailAddresses}} | Export-Csv
-Path C:\Temp\MFA_Report.csv
-NoTypeInformation
or
Get-msoluser -All | Select-Object @{N='UserPrincipalName';E={$_.UserPrincipalName}},
@{N='MFA Status';E={if ($_.StrongAuthenticationRequirements.State){$_.StrongAuthenticationRequirements.State} else {"Disabled"}}},
@{N='MFA Methods';E={$_.StrongAuthenticationMethods.methodtype}},
@{N='Auth Email';E={$_.StrongAuthenticationUserDetails.email}},
@{N='Auth Phone';E={$_.StrongAuthenticationUserDetails.PhoneNumber}},
@{N='Auth Device';E={$_.StrongAuthenticationPhoneAppDetails.DeviceName}},
@{N='Alternative Phone';E={$_.StrongAuthenticationUserDetails.AlternativePhoneNumber}},
@{N='Alternative Email';E={$_.AlternateEmailAddresses}} | Out-GridView
Wednesday, January 15, 2020
Get and Set-AzureADUserExtension to find the users property
Guest B2 B account user does not has few extension property value like employeeId and others , understanding this , We need to use set command to push the value to guest account.
Set-AzureADUserExtension -ObjectId 0fc8c68a-9fb7-4ddd-ac3b-3d3c8bd26b2a -ExtensionName "employeeid" -ExtensionValue "1001"
Get-AzureADUser -ObjectId fde1c840-25ac-4332-a47a-54a1f18a4463 | FL
Set-AzureADUserExtension -ObjectId 0fc8c68a-9fb7-4ddd-ac3b-3d3c8bd26b2a -ExtensionName "employeeid" -ExtensionValue "1001"
Get-AzureADUser -ObjectId fde1c840-25ac-4332-a47a-54a1f18a4463 | FL
Subscribe to:
Posts (Atom)
HTML
Script: