I'm fairly new to using the exchange powershell so please bear with me. I'm making an script to create an user mailbox on reciept of thier Samaccountname.
Im having some problems gettings the details of an users mailbox. More specifically the mailbox database and store name. I cant seem to find the correct Cmdlet to show this for an individual user.
I dont suppose anyone knows what this is or an way which i can get them?
Many Thanks
p.s. i have the below script which will return an given commands results, and i use the language AutoIt (if you can help as if it is an VB script, i can convert)
Code: Select all
Func Exchange2007MailboxDetails($strUser,$intWidth)
Const $OUTPUT_CONSOLE = 0
Const $OUTPUT_WINDOW = 1
Const $OUTPUT_BUFFER = 2
$strPsCmd = "get-mailbox " & $strUser
$objActiveXPosh = ObjCreate("SAPIEN.ActiveXPoSH")
$objActiveXPosh.Init("True")
$objActiveXPosh.OutputMode = $OUTPUT_BUFFER ; Set output to window
$objActiveXPosh.OutputWidth = $intWidth
$objActiveXPosh.Execute("Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin")
$objActiveXPosh.Execute($strPsCmd)
$ExecPowerShellCommand = $objActiveXPosh.OutputString
$objActiveXPosh.ClearOutput()
$objActiveXPosh = ""
EndFunc