1 60 61 | # Formatting using : http://hilite.me/ # Run this script in PowerShell ISE 64 bit #Use Global Admin credential while prompts. Set-ExecutionPolicy unrestricted Install-Module MSOnline Import-Module MSOnline $AzureAdCred = Get-Credential Connect-MsolService -Credential $AzureAdCred Connect-AzureAD -Credential $AzureAdCred $Datetime= Get-Date -Format dd_MM_yyyy_HH.mm.ss $LogFileName=([string]::Concat("C:\Temp\Output_O365-E3License-Users_Without_SharePoint-Activated " , $Datetime ,".csv")) New-Item $LogFileName -ItemType file Add-Content $LogFileName -Value ([string]::Concat("User Name" +","+ "User Prinicpal Name" +","+ "Usage Location")) $users = Get-MsolUser -all | Where isLicensed -EQ $true $intFlag =0 Foreach ($user in $users) { $intFlag = 0 $assignedplans = (Get-AzureADuser -ObjectId $user.UserPrincipalName).assignedplans foreach ($assignedplan in $assignedplans) { #Write-Host "$($assignedplan.service) "-ForegroundColor White
|
Monday, September 2, 2019
How to find the users in Office 365 E3 License with "Forms" activated
Wednesday, July 31, 2019
Azure SSO changes for Google
Azure SSO changes for Google
1.Sign on URL :https://www.google.com/a/<domain>/ServiceLogin?continue=https://apps.google.com/user/hub
2.Identifier (Entity ID) : google.com/a/<DOMAIN>
3.User Attributes & Claims Unique User Identifier = user.userprincipalname
Saturday, July 27, 2019
How to add office 365 users in Office 365 groups = Group type "Office 365"
Script to bulk upload user to use Office 365 Group of type "Office 365" Not "Security".
1) Create a CSV file with colum name "UserPrincipalName"
Add all the email, which needs Microsoft 365 license .
1 2 3 4 5 6 7 8 9 10 11 12 13 | #Create credential object $credObject = Get-Credential #Import the Exchange Online ps session $ExchOnlineSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $credObject -Authentication Basic -AllowRedirection Import-PSSession $ExchOnlineSession Import-CSv -Path “C:\Users\sanjivk\D365\Assisgn Bulk license script\Assign D365 license user 1.0.CSV” | ForEach { $UPN=$_.UserPrincipalName Write-Host $UPN Add-UnifiedGroupLinks –Identity "D365Prod-CR Account Configuration Team-OSG" –LinkType Members –Links $UPN } |
Friday, July 19, 2019
How to add office 365 users in Office 365 security groups = Group type "Security"
Script to bulk upload user to use Office 365 Group of type "Security" Not "Office 365".
1) Create a CSV file with colum name "UserPrincipalName"
Add all the email, which needs Microsoft 365 license .
1) Create a CSV file with colum name "UserPrincipalName"
Add all the email, which needs Microsoft 365 license .
Set-ExecutionPolicy unrestricted Install-Module MSOnline $AzureAdCred = Get-Credential Connect-MsolService -Credential $AzureAdCred Import-CSv -Path “D:\Assign D365 license user 1.0.CSV” | ForEach { $UPN=$_.UserPrincipalName $Users=Get-MsolUser -UserPrincipalName $UPN
# Get the Security Group id from Azure Ad
$Groupid = Get-MsolGroup -ObjectId “1349607e-825a-45d0-b3a2-068de8f6” $Users | ForEach {Add-MsolGroupMember -GroupObjectId $GroupID.ObjectID -GroupMemberObjectId $Users.ObjectID -GroupMemberType User} }
Tuesday, May 21, 2019
Office 365 Password never expire change for Single user
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #Get the office 365 credential $AzureAdCred = Get-Credential Connect-MsolService -Credential $AzureAdCred Connect-AzureAD -Credential $AzureAdCred # Below powershell command is used to set the PasswordNeverExpires to True. Set-MsolUser -UserPrincipalName sanjiv@softpoc.com -PasswordNeverExpires $true # Below powershell command is used to Get the PasswordNeverExpires status for individual user. Get-AzureADUser -ObjectId sanjiv@softpoc.com | Select-Object UserprincipalName,@{ N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"} } |
Thursday, May 9, 2019
Get SharePoint Online all site collection details using power shell
# If you find error related with Connect-SPOService . You need to download and install the SharePoint Online Management Shell : DOWNLOAD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $SPOModulePath = 'C:\Program Files\SharePoint Online Management Shell\' $adminUPN = 'Admin.User@softPOC.com' $orgName = 'SOFTPOC' $userCredential = Get-Credential -UserName $adminUPN $Env:PSModulePath = '{0};{1}' -f $Env:PSModulePath, $SPOModulePath Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking $uri = "https://$orgName-admin.sharepoint.com" Connect-SPOService -Url $uri -Credential $userCredential $sites = Get-SPOSite -Limit All $sites | select url,owner # Create a folder with name Temp in C:\ drive $CSVpath = "C:\Temp\SharePoint-SiteCollection-Report-New.csv" $sites | Export-CSV -Path $CSVpath -Append -NoTypeInformation
Saturday, December 8, 2018
rewrite_2.0_rtw_x64.msi Skype for business 2015 installation error on Windows server 2016
While installing Skype for business 2015 on windows server 2016 throws
Prerequisite installation failed: RewriteModule error.
Resolution : open registry file start-> Run -> Regedit -> search for InetStpComputer\HKLM\Software\Microsoft\InetStp
change the Reg_DWORD "Major version" value from 10 to 7 , This is a bug of Skype for business where rewrite_2.0_rtw_x64.msi installation is looking for IIS7 , As Windows 2016 server has IIS 10 , This throws an error.
Once the Skype installation gets done change the Reg_DWORD vaue back to 10
Subscribe to:
Posts (Atom)
HTML
Script:

