Exchange 2010 and Online Scripting Help


is there way search mailboxes in domain or particular ous , extract following info:

mailbox name, email address, if there people permissions mailbox , particular permissions (full mailbox, send as, etc).

first don't place on 1 line.  cannot understood or maintained.

this formatted view of code.  won't work many reasons because ignore basics of powershell.

get-aduser -server "server" -searchbase "ou" -filter * -properties * |  	select name,  			description,  			company,  			title,  			@{ name = 'manager'; expression = { (get-aduser -server "server" $_.manager).name } },  			physicaldeliveryofficename,  			emailaddress,  			streetaddress,  			city,  			state,  			postalcode,  			country |  			foreach {  				get-mailbox -resultsize unlimited |  					get-mailboxstatistics |  					select-object displayname, lastloggedonuseraccount, lastlogontime, lastlogofftime, totalitemsize, itemcount } |  					export-csv "$home\desktop\usertest.csv" -verbose -force -notype

it contains massive syntax , logical errors.

try follow code 1 iteration of pipeline @ time.

what passed las "foreach-object" , controlling get-mailbox?

what purpose first "select-object" have?  none?


\_(ツ)_/





Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file