MİCROSOFT OFFİCE 365 - POWERSHELL

Office 365 Kullanıcılarına Toplu Olarak (Bulk) Farklı Türde Lisans Atama

Bu yazımızda Powershell komutları ile Office 365 kullanıcılarına farklı türde lisans atama işlemini gerçekleştiriyor olacağız.

Bildiğiniz üzere kullanıcıların Office 365’te Outlook, SharePoint Online, Skype For Business ve diğer hizmetleri kullanmak için lisanslara ihtiyaçları vardır. Bir genel yönetici veya kullanıcı yönetimi yöneticisi olarak, yeni hesaplar oluştururken yeni kullanıcılara ve daha önce hesabı olan kullanıcılara kolayca lisans atayabilirsiniz. Bu lisansları tek tek atamak yerine tek seferde Powershell ile ekleyebiliyoruz.

Not: Kullanıcının lisansı kaldırıldığında, söz konusu kullanıcı hesabıyla ilişkilendirilmiş tüm veriler 30 gün süreyle tutulur. Verilen 30 günlük süre dolduktan sonra bu veriler silinir (SharePoint Online’a kaydedilen belgeler dışında) ve kurtarılamaz.

Lisans atama işlemini öncesinde ise CSV dosyası oluşturulması gerekir.

CSV Dosyası Hazırlanması


Farklı türde lisans eklerken Excel içine UPN adresi ve Lisans ismini ile birlikte yazıyoruz.


Daha sonrasında Excel tablosu üzerinde “VERİ” sekmesi geliyoruz. Ardından Metni Sütunlara dönüştür butonuna tıklıyoruz ve Sınırlandırılmış (Virgül ve sekme karakterle ayrılmış.) seçili iken ilerliyoruz.


“Virgül” butonunu işaretliyoruz.


Son diyoruz.


Excel üzerinde yapılan işlemleri, Kayıt türü CSV(Virgülle Ayrılmış) olarak belirterek farklı kaydediyoruz.


Sonrasında ise License1 isimli Excel tablosunu Notepad üzerinde açıyoruz ve ” ; ” – ” , “ olarak düzenliyoruz.


Encoding – UTF-8 olarak kaydediyoruz.

CSV dosyamızı hazırlandıktan sonra ise Powershell ile Office 365 hesabınıza bağlanmanız gerekir. Bu bağlantıyı sağlamak için aşağıda paylaşacağım “Microsoft Online Services Sign-In Assistant for IT Professionals RTW” ve “Windows Azure Active Directory Module for Windows PowerShell” indirmeniz gerekir.

Linkler;

Microsoft Online Services Sign-In Assistant for IT Professionals RTW: https://www.microsoft.com/en-us/download/details.aspx?id=41950

Windows Azure Active Directory Module for Windows PowerShell : http://go.microsoft.com/fwlink/p/?linkid=236297

Yukarıdaki iki link’ in kurulumu başarılı bir şekilde yaptıktan sonra Windows Azure Active Directory Module Run As Administrator olarak çalıştırıyoruz.

Powershell ile Office 365 Bağlantı sağlamak

Set-ExecutionPolicy Unrestricted

Import-Module MSOnline

$O365Cred = Get-Credential

$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection

Import-PSSession $O365Session

Connect-MsolService –Credential $O365Cred


Office 365 Credentials bilgilerimizi giriyoruz.


Powershell ile Office 365 ‘e sağlıklı bir şekilde bağlantı sağlıyoruz.


Get-MsolAccountSku | fl Komutu ile Office 365 panelimize bulunan ilgili lisansları görebiliyoruz. Resimde gördüğümüz gibi “Office 365 Kurumsal E3″ ve “Office 365 Kurumsal E5” lisansı görünmektedir.


$Users = Import-Csv -Path “C:\license.csv”

foreach ($User in $Users)

{

Set-MsolUserLicense -UserPrincipalName $User.UPN -AddLicenses $User.License

}



Office 365 üzerinde Farklı türde lisansları bu şekilde ekleyebiliriz.

I was born in Istanbul. I completed my high school education in system network engineering, my university studies in Computer Technology and Programming Sciences, and earned a four-year degree from Anadolu University. As an experienced technology consultant, I have gained extensive experience in the field of information technology for over 10 years. I have worked in both large corporate companies and small-scale startups, specialising in providing strategic technology solutions to clients across various industries. During this time, I have developed into a determined and reliable IT consultant, covering the entire technology field, including project management, training, and pre- and post-sales support for corporate solutions. I have both individual and team-based experience in management, implementation, and design in areas such as cybersecurity, endpoint security, data security, cloud migration, and infrastructure. As a result, I always use the phrase “It can be better” in every situation I encounter. I currently work as a “Cyber Security Principal Expert ☁” at Koçsistem, Microsoft’s top partner. My skills and abilities Cloud Computing Architecture Microsoft 365 Migration and Management Azure Infrastructure Modern Workplace Digital transformation Microsoft 365 Exchange Online EOP ( Exchange Online Protection) Microsoft Defender for Office 365 Microsoft Defender for Endpoint Microsoft Defender for Cloud Apps Microsoft Defender for Cloud Microsoft Defender for Identity Microsoft Intune Microsoft Sentinel Microsoft Teams Hybrid Solutions Mobile Device Management and Mobile Application Management. Data Loss Prevention and Protection Microsoft Information Protection Cloud Identity and Access Management Solution MS Windows Server Family Microsoft Client Windows 11 Management of Hyper-v and VMware Virtualization Platforms Active Directory configuration and management Exchange Server configuration and management Veeam Backup installation and configuration WDS,MDT configuration and management Certificates ; MCT: Microsoft Certified Trainer 2019-2020 MS: Designing and Providing Microsoft Volume Licensing Solutions to Large Organizations MCTS: Designing, Assessing, and Optimizing Software Asset Management (SAM) MCPS: Microsoft Certified Professional MCSA: Windows Server 2012 MCSE: Private Cloud WMSP: Veeam Sales Professional VMTSP: Veeam Technical Sales Professional Coursera-Cybersecurity Solutions and Microsoft Defender Coursera-Cybersecurity Management and Compliance Google – Google Professional Cloud Architect

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir