Skip to main content

PowerShell to compile report for last access date for all mailboxes in organization

Power Shell to compile report for last access date for all mailboxes in organization.


$users = Get-Mailbox -ResultSize unlimited
$mailboxstats = $users | Get-MailboxStatistics
$mailboxstats | select displayname,lastlogontime,lastloggedonuseraccount | Export-Csv -NoTypeInformation -Path C:\temp\*.csv –Force 


If you would like to know from Mailbox server point of view and target just one server.

Get-MailboxStatistics -server Mailbox Server |sort lastlogonTime -Descending >c:\Avi.txt


If you would like to target database you certainly do it.

Get-MailboxStatistics -Database "Mailbox Database"







Comments

Popular posts from this blog

"kerberos: the specified credentials were rejected by the server", "unreachable": true" Ansible

Hello Friends, I was getting following Error while deploying my Ansible script, Basically my credential were getting rejected by server. SSH password: PLAY [Playbook_Name] ***************************************************************02:00:30 TASK [Gathering Facts] *********************************************************02:00:30 fatal: [Server_Inventory_Name]: UNREACHABLE! => {"changed": false, "msg": "kerberos: the specified credentials were rejected by the server", "unreachable": true} PLAY RECAP *********************************************************************02:00:30 Server_Inventory_Name    : ok=0    changed=0    unreachable=1   failed=0  It was resolved using one additional parameter in Inventory  i.e  "ansible_winrm_server_cert_vaildation:ignore"

NBSUTIL commands

Frustrated with syntax finding hence decided to post all NBSTLUTIL related commands so people will not face same problem. Common SLP Related Commands Show EMM Image list of Images that were backed up to an SLP STU [ -I / -U ] nbstlutil list nbstlutil list –lifecycle <name> nbstlutil list –backupid <id_value> nbstlutil list -image_state <value> nbstlutil list -copy_state <value> nbstlutil list -frag_state <value> nbstlutil list –mediaid <media_id>_–state 3 Activate /Inactivate SLP operations nbstlutil inactive –lifecycle <lifecycle name> nbstlutil inactive –backupid <backupid> nbstlutil active –lifecycle <lifecycle name> nbstlutil active –backupid <backupid> Cancel pending operations on selected image nbstlutil cancel -backupid <backupid> nbstlutil cancel -lifecycle <lifecycle> Show status on Incomplete copies of Lifecycle Managed images nbstlutil stlilist –lifecycle <lifecycle name> nbstlutil stlil...

HP P2000 G3 & Management Host

Frustrated with HP P2000 G3? Hello, I know it’s frustrating when you had 100 of P2000 G3 across your environment and it gave you Management host down errors. TBH management host down basically don’t impact you but it will restrict your remote access for storage and hence you need management host up and running Two options... 1st Option Each enclosure has 2 management host A and B if one of these were down you can telnet working one and Reboot another management host you can do this anytime this doesn't Need any down time. Telnet working host Provide Storage credentials Command Restart Mc A (whichever you want to reboot A or B try this 4-5 time and your management host will be up and working)     2nd Option... Connect USB cable at the rear side of your storage you will sew CLI port (Mini USB) connect there one end and other to your working server.   Open Device Manager- Refresh Check serial and LPT ...