Powershell’in en önemli kullanım alanlarından birisi de Office 365 yönetimi. Sadece portal üzerinden yönetilebilen Office 365’i alternative olarak Powershell üzerinden de yönetebilirsiniz. Kullanıcılarınızı, gruplarınızı, lisans yönetiminizi, güvenlik özelliklerinizi.. kısacası portal üzerinden yapabildiğiniz tüm yönetimsel faaliyetleri çok daha hızlı ve esnek olarak Powershell içerisinden de yönetebilirsiniz. Bu yazıda öncelikle Office 365’e Powershell ile bağlantı gerçekleştireceğiz ve yapabileceklerimize göz atacağız.
Powershell içerisinden Office 365 yönetimi yapabilmek için öncelikle aşağıdaki uygulamanın indirilmesi gerekmektedir.
https://www.microsoft.com/en-in/download/details.aspx?id=28177
Uygulamayı bilgisayarınıza kurarak devam ediyoruz.
Artık Powershell Office 365’e bağlanmak için gerekli modüle sahip duruma geldi. Şimdi bakalım bu yeni modül içinde neler var?
Tam komut listesi ise şöyle;
CommandType | Name |
Cmdlet | Add-MsolAdministrativeUnitMember |
Cmdlet | Add-MsolForeignGroupToRole |
Cmdlet | Add-MsolGroupMember |
Cmdlet | Add-MsolRoleMember |
Cmdlet | Add-MsolScopedRoleMember |
Cmdlet | Confirm-MsolDomain |
Cmdlet | Confirm-MsolEmailVerifiedDomain |
Cmdlet | Connect-MsolService |
Cmdlet | Convert-MsolDomainToFederated |
Cmdlet | Convert-MsolDomainToStandard |
Cmdlet | Convert-MsolFederatedUser |
Cmdlet | Disable-MsolDevice |
Cmdlet | Enable-MsolDevice |
Cmdlet | Get-MsolAccountSku |
Cmdlet | Get-MsolAdministrativeUnit |
Cmdlet | Get-MsolAdministrativeUnitMember |
Cmdlet | Get-MsolCompanyInformation |
Cmdlet | Get-MsolContact |
Cmdlet | Get-MsolDevice |
Cmdlet | Get-MsolDeviceRegistrationServicePolicy |
Cmdlet | Get-MsolDirSyncConfiguration |
Cmdlet | Get-MsolDirSyncProvisioningError |
Cmdlet | Get-MsolDomain |
Cmdlet | Get-MsolDomainFederationSettings |
Cmdlet | Get-MsolDomainVerificationDns |
Cmdlet | Get-MsolFederationProperty |
Cmdlet | Get-MsolGroup |
Cmdlet | Get-MsolGroupMember |
Cmdlet | Get-MsolHasObjectsWithDirSyncProvisioningErrors |
Cmdlet | Get-MsolPartnerContract |
Cmdlet | Get-MsolPartnerInformation |
Cmdlet | Get-MsolPasswordPolicy |
Cmdlet | Get-MsolRole |
Cmdlet | Get-MsolRoleMember |
Cmdlet | Get-MsolScopedRoleMember |
Cmdlet | Get-MsolServicePrincipal |
Cmdlet | Get-MsolServicePrincipalCredential |
Cmdlet | Get-MsolSubscription |
Cmdlet | Get-MsolUser |
Cmdlet | Get-MsolUserByStrongAuthentication |
Cmdlet | Get-MsolUserRole |
Cmdlet | New-MsolAdministrativeUnit |
Cmdlet | New-MsolDomain |
Cmdlet | New-MsolFederatedDomain |
Cmdlet | New-MsolGroup |
Cmdlet | New-MsolLicenseOptions |
Cmdlet | New-MsolServicePrincipal |
Cmdlet | New-MsolServicePrincipalAddresses |
Cmdlet | New-MsolServicePrincipalCredential |
Cmdlet | New-MsolUser |
Cmdlet | New-MsolWellKnownGroup |
Cmdlet | Redo-MsolProvisionContact |
Cmdlet | Redo-MsolProvisionGroup |
Cmdlet | Redo-MsolProvisionUser |
Cmdlet | Remove-MsolAdministrativeUnit |
Cmdlet | Remove-MsolAdministrativeUnitMember |
Cmdlet | Remove-MsolApplicationPassword |
Cmdlet | Remove-MsolContact |
Cmdlet | Remove-MsolDevice |
Cmdlet | Remove-MsolDomain |
Cmdlet | Remove-MsolFederatedDomain |
Cmdlet | Remove-MsolForeignGroupFromRole |
Cmdlet | Remove-MsolGroup |
Cmdlet | Remove-MsolGroupMember |
Cmdlet | Remove-MsolRoleMember |
Cmdlet | Remove-MsolScopedRoleMember |
Cmdlet | Remove-MsolServicePrincipal |
Cmdlet | Remove-MsolServicePrincipalCredential |
Cmdlet | Remove-MsolUser |
Cmdlet | Reset-MsolStrongAuthenticationMethodByUpn |
Cmdlet | Restore-MsolUser |
Cmdlet | Set-MsolADFSContext |
Cmdlet | Set-MsolAdministrativeUnit |
Cmdlet | Set-MsolCompanyContactInformation |
Cmdlet | Set-MsolCompanySecurityComplianceContactInformation |
Cmdlet | Set-MsolCompanySettings |
Cmdlet | Set-MsolDeviceRegistrationServicePolicy |
Cmdlet | Set-MsolDirSyncConfiguration |
Cmdlet | Set-MsolDirSyncEnabled |
Cmdlet | Set-MsolDomain |
Cmdlet | Set-MsolDomainAuthentication |
Cmdlet | Set-MsolDomainFederationSettings |
Cmdlet | Set-MsolGroup |
Cmdlet | Set-MsolPartnerInformation |
Cmdlet | Set-MsolPasswordPolicy |
Cmdlet | Set-MsolServicePrincipal |
Cmdlet | Set-MsolUser |
Cmdlet | Set-MsolUserLicense |
Cmdlet | Set-MsolUserPassword |
Cmdlet | Set-MsolUserPrincipalName |
Cmdlet | Update-MsolFederatedDomain |
Şimdi öncelikle Office 365’e organizasyon bilgileriyle (hesap bilgileri) bağlanmamız gerekiyor. Bu sayede yukarıdaki komutları kullanabilir durumda olacağım.
Bunun için öncelikle Office 365 portalına bağlanmak için kullandığım Kullanıcı Adı ve Parolayı bir credential olarak Powershell’e söylemem gerekiyor. Sonraında da Connect-MsolService komutunu kullanarak bağlantımı gerçekleştireceğim.
$credential=Get-Credential
Connect-MsolService -Credential $Credential
Şimdi artık bağlantımızı gerçekleştirdiğimize göre Office 365 Organizasyonumu tüm yönleriyle bu yönetibiliriz.
Sonraki yazılarımızda bir çok önemli komuta uygulamalı olarak yer vereceğim.
Sorular için bakionur@bakionur.com