Serkan DURAN IT Blog

Microsoft Office365 Powershell Bağlantısı

26.05.2019
2.904
Microsoft Office365 Powershell Bağlantısı

 

 

 

 

 

 

Windows PowerShell için Microsoft Online Services Modülü (64 bit sürümü)

http://go.microsoft.com/fwlink/p/?linkid=236297&clcid=0x41F

  • Microsoft Office365 Powershell Bağlantısı

    $LiveCred = Get-Credential

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
    Import-PSSession $Session

    connect-msolservice -cred $LiveCred

  • Microsoft Office365 Powershell Script Hatası

    Set-ExecutionPolicy Unrestricted

  • Microsoft Office365 Password Never Expire

    Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

  • Microsoft Office365 Powershell Disconnect

    Remove-PSSession $Session

  • Microsoft Office365 Silinmiş Kullanıcıların Kalıcı Olarak Silinmesi

    Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin –Force

  • Microsoft Office365 Kullanıcı Bazında Expire Kapatılması

    Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true

  • Microsoft Office365 Kullanıcıların Son Logon Tarihlerinin Görüntülenmesi

    Get-mailbox -resultsize unlimited| Get-MailboxStatistics | select displayname, lastlogontime

  • Microsoft Office365 Kullanıcı Listesinin Export Edilmesi

    Get-MsolUser | select DisplayName,FirstName,LastName,UserPrincipalName,MobilePhone,PhoneNumber,Office,Fax,StreetAddress,PostalCode,City,Country,State,Department, IsLicensed ,PreferredLanguage , Title , UsageLocation | Export-Csv  <Path>

  • Microsoft Office365 Kullanıcılı Listesinin Last Logon Tarihlerine Göre Export Edilmesi

    get-mailbox -resultsize unlimited | Get-MailboxStatistics | Sort-Object LastLogonTime -Descending | select displayname, lastlogontime >C:\LastLogonTime.txt

  • Microsoft Office365 Tek Bir External Kontağın Saklanması

    Set-MailContact <external contact> -HiddenFromAddressListsEnabled $true

  • Microsoft Office365 Tüm External Kontakların Saklanması

Get-Contact -ResultSize unlimited -Filter {(RecipientTypeDetails -eq ‘MailContact’)} | Set-MailContact -HiddenFromAddressListsEnabled $true

Policy Pasif etme (Geçerli oturum için)

Set-executionPolicy RemoteSigned

Office 365 içerisinde aktif olan ikincil özelligini asagida paylastigim komut ile tüm yapi için kapatabilirsiniz.

Get-Mailbox | Set-Clutter -Enable $false

Ayrica tüm mailleri silmek için asagidaki komutu kullanabilirsiniz.

Search-Mailbox -Identity “Kullanicinin ismi ve soyismi” -DeleteContent

Belli tarih araligindaki mailler için asagidaki komutu kullanabilirsiniz.

Search-Mailbox -Identity Kullanicininismi -SearchQuery ‘(Received:08/20/2015..08/20/2015)’ -DeleteContent

 

 

BİR YORUM YAZIN

ZİYARETÇİ YORUMLARI - 0 YORUM

Henüz yorum yapılmamış.

Copyright © 2019 Serkan DURAN