18 July 2015

Remove empty entries from split array


$a = 'Surname        GivenName1  GivenName2'
$a = $a.Split(' ',[System.StringSplitOptions]::RemoveEmptyEntries) -join ' '

result: 'Surname GivenName1 GivenName2'

10 July 2015

Using the Import-FIMConfig cmdlet

In ImportObject has:

  • a state
    • Create - create a new object
    • Put - update the object TargetObjectIdentifier with the attribute changes
    • Delete - delete the object TargetObjectIdentifier
    • Resolve - resolves an object in FIM by using the information in AnchorPairs as search criteria
    • None - operation is ignored
  • a list of attributes changes
When updating existing objects, you must define the specific attribute changes.
Each change is an ImportChange that represents a specific attribute value change.
An ImportChange includes an Operation, which informs the web service about the type of change to make on the specific attribute.

Operations are:
  • Add - attribute value should be added to multivalued attribute
  • Replace - attribute value should replace a single valued attribute
  • Delete - attribute value should be removed from the multivalued attribute
  • None - attribute value is included in a Create


The FullyResolved flag indicates whether the Import-FIMConfig cmdlet should search the AttributeValue for instances of SourceObjectIdentifier GUIDs.
 
If true, the cmdlet assumes that all references are correct and submits the AttributeValue verbatim. 
If false, the cmdlet assumes that there exists at least one reference to either a Create or Resolve state. 

The cmdlet replaces all GUIDs with values retrieved from previous Create or Resolve states. 
If a GUID is found but cannot be matched, then the cmdlet aborts, executing this ImportObject as 
not all references are correct.


06 July 2015

Verify exchange database witespace


Get-MailboxDatabase  -Status |Select-Object AdminDisplayName,AvailableNewMailboxSpace, DatabaseSize