Creating Hard Drives via the HP Smart Storage Administrator CLI

Scenario:  You want to provision additional Hard Drives in your HP Servers  to existing Zone Groups. You have a 3TB physical drive and want to create 3 logical drives from it.

This command shows the physical drives. You are specifically looking for the Unassigned Drives (typically at the bottom). You want to get the physicaldrive number:

ctrl slot=2 physicaldrive all show detail

These commands below will create a new array (automatically choosing the next array letter) and cuts up the physical drive into 3 logical drives. By specifying the physicaldrive number in the first command, it automatically assigns an Array letter.  In the following 2 commands, I know the drive letter so I specified it.

ctrl slot=2 create type=ld drives=53:1:11 raid=0 Size=1024000
ctrl slot=2 Array Z create type=ld size=1024000 raid=0
ctrl slot=2 Array Z create type=ld size=1024000 raid=0

 

 

 

 

 

Check the Total Physical Memory via Powershell

Scenario:  You add a bunch of memory to multiple servers and you want to check the amount on each server to verify it.

Powershell:

Check one Server in GB:   [math]::Round((Get-WmiObject -Class Win32_ComputerSystem  -computer ServerName).TotalPhysicalMemory/1GB)

Check one server in MB: [math]::Round((Get-WmiObject -Class Win32_ComputerSystem  -computer ServerName).TotalPhysicalMemory/1MB)

Check Multiple Exchange Servers:

$server = Get-exchangeservers

$server | %{ Write-Host $_; [math]::Round((Get-WmiObject -Class Win32_ComputerSystem  -computer $_).TotalPhysicalMemory/1GB)}

Cannot Remove a Exchange 2013 Database

Scenario: When you are trying to remove an Exchange Database,  you receive the following error below.

This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or
arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database
<Database ID>. To get a list of all mailbox plans in this database, run the command Get-MailboxPlan. To get a list of
archive mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Archive. To get a list of all
public folder mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -PublicFolder. To get a
list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration.
To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox
<Mailbox ID>. To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox
<Mailbox ID> -Archive. To disable a public folder mailbox so that you can delete the mailbox database, run the command
Disable-Mailbox <Mailbox ID> -PublicFolder. Arbitration mailboxes should be moved to another server; to do this, run
the command New-MoveRequest <parameters>. If this is the last server in the organization, run the command
Disable-Mailbox <Mailbox ID> -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox.
Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan <MailboxPlan ID>
-Database <Database ID>.

You have also verified that there are no mailbox/mailbox types on the database you wish to remove by running the following commands:

get-mailbox -database DB01
get-mailbox -archive -database DB01 -DomainController <root dc>
get-mailbox -PublicFolder -database DB01
get-mailbox -Arbitration -database DB01

Resolution:  Although an archive mailbox did not reside on the database we are trying to remove, we found that the database was still referenced in an archive mailbox that resided on a different database.  The archive mailbox was referencing the database via the msExchArchiveDatabaseLink property in ADSIEdit.

Once we discovered the archive mailbox, we moved it to another database, thus refreshing the properties in ADSI Edit and removing the database we wished to remove.

To determine which mailbox may be holding you up from removing an Exchange Database, follow these steps:

1. Remove the database in verbose:   remove-mailboxdatabase DB01 -verbose

2. Before it shows the error message, pay attention to the Verbose logging as it references the mailbox which is preventing the database from being removed.
VERBOSE: [18:03:27.819 GMT] Remove-MailboxDatabase : Runspace context: Executing user:
domain.com/users/exadmin, Executing user organization: , Current organization: , RBAC-enabled:
Enabled.
VERBOSE: [18:03:27.851 GMT] Remove-MailboxDatabase : Active Directory session settings for ‘Remove-MailboxDatabase’
are: View Entire Forest: ‘False’, Default Scope: ‘domain.com’, Configuration Domain Controller:
‘DC1.domain.com’, Preferred Global Catalog: ‘DC1.domain.com’, Preferred Domain Controllers: ‘{
DC1.domain.com }’
VERBOSE: [18:03:27.866 GMT] Remove-MailboxDatabase : Beginning processing Remove-MailboxDatabase
VERBOSE: [18:03:27.866 GMT] Remove-MailboxDatabase : Instantiating handler with index 0 for cmdlet extension agent
“Admin Audit Log Agent”.
VERBOSE: [18:03:27.866 GMT] Remove-MailboxDatabase : Current ScopeSet is: { Recipient Read Scope: {{, }}, Recipient
Write Scopes: {{, }}, Configuration Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [18:03:27.866 GMT] Remove-MailboxDatabase : Searching objects “db01” of type “MailboxDatabase” under the
root “$null”.
VERBOSE: [18:03:27.882 GMT] Remove-MailboxDatabase : Previous operation run on domain controller
‘DC1.domain.com’.
VERBOSE: [18:03:27.960 GMT] Remove-MailboxDatabase : Verifying that there is no associated mailbox user or move request
 on the mailbox database “db01”.
VERBOSE: [18:03:28.023 GMT] Remove-MailboxDatabase : Mailbox with DistinguishedName
“CN=jdoe1,CN=Users,DC=domain,DC=com” is still present in this database.
VERBOSE: [18:03:28.038 GMT] Remove-MailboxDatabase : Admin Audit Log: Entered Handler:OnComplete.

 

Add a IP Address to the RemoteIPRanges of an existing Receive Connector

Scenario:  Your Exchange 2013 Servers Receive Connector already has multiple values assigned to it.  Because its a multi-valued field,  you cannot easily add a single IP address to it without overwriting the contents of the field using a command similar to: set-receiveconnector -remoteipranges 10.10.0.2

Solution: In order to add a IP address to an existing set of RemoteIPRanges for a receiveconnector, run the following:

$RC = Get-ReceiveConnector "Ex2013-1Default FrontEnd Ex2013-1"

$RC.RemoteIPRanges += "10.10.0.2"

Set-ReceiveConnector "Ex2013-1Default FrontEnd Ex2013-1" -RemoteIPRanges $RC.RemoteIPRanges

 

Determine the IP Address and check to see if a PTR record exists for each Exchange Server

Scenario:  You want to determine the IP Address and PTR record for each Exchange Server in your environment.   Below is the script I used.  This will query for DNS and put the results into a table called $final.

Script:

$servers = get-exchangeserver ex2013* | Where AdminDisplayVersion -like *15*

$final = @()

$Servers | %{ 
write-host $_.Name
$Name = ([System.Net.Dns]::GetHostEntry("$_")).HostName;
$Address = ([System.Net.Dns]::GetHostEntry("$_")).AddressList;
$PTR = ([System.Net.Dns]::GetHostByAddress($Address)).HostName

$returnobj = new-object psobject
$returnobj |Add-Member -MemberType NoteProperty -Name "ServerName" -Value $Name
$returnobj |Add-Member -MemberType NoteProperty -Name "IPAddress" -Value $Address
$returnobj |Add-Member -MemberType NoteProperty -Name "PTR" -Value $PTR
$final += $returnObj

$Name = $null
$address = $null
$ptr = $null


}

$final

 

 

 

Working with Mailbox Database Copy Activation

This example only suspends activation for the copy of the database DB1 hosted on the Mailbox server MBX3.
Suspend-MailboxDatabaseCopy –identity DB1MBX3 –ActivationOnly

To Resume activation
Resume-MailboxDatabaseCopy –identity DB1MBX3

To block all databases hosted on a server from activating.
Set-MailboxServer –identity MBX3 –DatabaseCopyAutoActivationPolicy Blocked

Resume activation of server
Set-MailboxServer –identity MBX3 –DatabaseCopyAutoActivationPolicy Unrestricted

To block all databases hosted on a group of servers from activating. Use wildcard (MBX*)
Set-MailboxServer –identity MBX* –DatabaseCopyAutoActivationPolicy Blocked

Determine the true size of a mailbox by adding together the TotalItemSize and TotalDeletedItemSize values.

Scenario:  Determine the true size of a mailbox by adding together the TotalItemSize and TotalDeletedItemSize values together via a script and put the values into a table.  These values are properties of the Get-MailboxStatistics commandlet.

Note:  The TotalDeletedItemSize is not included in the TotalItemSize value for a mailbox.  Test it by deleting all of your mailbox content and comparing the values before and after.  Then perform a mailbox move and Exchange will show the total size of the mailbox which is a combination of the two.

Script:

#query for your mailboxes
$stat = get-mailboxdatabase DB* | Get-mailboxstatistics | Select DisplayName,TotalDeletedItemSize, TotalItemSize,ItemCount

#Define array variable
$final = @()

#Loop
$stat | %{

$TIS = $_.TotalItemSize.Value.ToMB() | Measure-object -sum

$TDIS = $_.TotalDeletedItemSize.Value.ToMB() | Measure-object -sum

$Total = $TIS.sum + $TDIS.sum


#Build the Array
 $ServerObj = New-Object PSObject
 $ServerObj | Add-Member NoteProperty -Name "DisplayName" -Value $_.DisplayName
 $ServerObj | Add-Member NoteProperty -Name "MbxSize(InMB)" -Value $total
 $Final += $ServerObj    
}

$Final

 

 

 

Check Job ID for CommVault Stub

Scenario:  A user cannot retrieve their CommVault Stubs via the CommVault Outlook Add-in.  After a server-side full restore of our CommVault Archives a while ago, we know we are missing data from specific time frames as not all the tapes could be restored from.  For due diligence, we need to prove that this stub is no longer associated with a Job ID that CommVault can no longer restore.

Resolution:

Determine the Job Information of the Stub:

  1. Logon to the Mailbox via MFCMapi.
  2. Drill down to the Message location (Top Of Information Store –> Inbox) and double click on the Message to open all associated properties for that single Message.
  3. Search for the tag that has a Value of CVStub_…
  4. The Value looks similar to this:CVSTUB_V1 -af 1011154:53:1383788 -of 20284970131 -at 1243361094 -cn 1011154 -es ExCVSrv1
    • 1383788 is the JOB ID we will need to perform a SQL Query with.
    • 1243361094 is the Unix Time Stamp for when the job was ran.
    • ExCVSrv1 is the server it was ran against.

Run the SQL Query against the CommCell Database:

  1. Run this command:   Select jobId from archchunkmapping where archfileid = 1383788
  2. If the result comes back null, it means that the CommVault Database no longer has a record for it and the data is no longer retreiveable.

 

Outlook for Mac Version

This is one method to determine the version of Outlook for Mac –

  1. Click the Apple icon
  2. Select About This Mac
  3. On the Overview tab, click System Report…
  4. On the left navigation pane, navigate to Software
  5. Expand Software
  6. Click Applications
  7. On the main pane, navigate to Microsoft Outlook

NOTE – These instructions were created using OS X Yosemite