How to fix problem when your hard drive became RAW.

Few days ago my boss asked me to check one hard drive. I was able to get everything. However next time when we connected this hard drive windows asked us to format it (RAW ).

This is how I fixed it.

  1. Go to Disk Management .
  2. Right click on problematic partition and chose option Change Drive Letter and Paths.
  3. Click add if partition is not mounted.
  4. Change letter for example X.
  5. Go to RUN.
  6. Type CMD.
  7. Type chkdsk X: /f
  8. Chkdsk should report some issues and fix them 🙂

That’s all folks.

How to create report of user mailbox size for Exchange in Powershell.(DisplayName, PrimarySmtpAddress, TotallItemSize).

This is one of my favorite Powershell scripts. Easy way to show how big are Exchange mailboxes and make your boss happy 🙂

This is the result:

Exchange Users, Mialbox Report

Copy and past 🙂

$Report=@()
$mailbox=Get-mailbox –resultsize unlimited
$mailbox| foreach-object{
$DisplayName=$_.DisplayName
$SmtpAddress=$_.PrimarySmtpAddress
$TotalItemSize=(get-mailboxstatistics –identity $DisplayName ).TotalITemSize
$obj=new-object System.Object
$obj|add-member -membertype NoteProperty -name "DisplayName" -value $DisplayName
$obj|add-member -membertype NoteProperty -name "PrimarySmtpAddress" -value $SmtpAddress
$obj|add-member -membertype NoteProperty -name "TotalItemSize" -value $TotalItemSize
$Report+=$obj
}
$path_s=[Environment]::GetFolderPath("Desktop")
$Report|Sort "TotalItemSize" -Descending | export-csv $path_s\report.csv -notype