I don't understand. We haven't done anything other than prove you can enumerate teh table.
There is something wrong with what yo are typing into the PS session. We need to try the next step.
$DebugPreference = "Continue"
$table | % { [string]$alias = $_.alias; write-debug $alias; Get-Mailbox -Identity $alias }
help with Get-Mailbox methods
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
help with Get-Mailbox methods
What happens when you just type $table
Do you see all of the data?
I am beginning to feel that you are not telling me some critical piece of information. What could that be?
Do you see all of the data?
I am beginning to feel that you are not telling me some critical piece of information. What could that be?
help with Get-Mailbox methods
yep both of those work and give me the first row information or just alias.
help with Get-Mailbox methods
that seems to work also
PS H:> foreach($row in $table){$row.alias}dickeylindaaktatedvoshall
PS H:> foreach($row in $table){$row.alias}dickeylindaaktatedvoshall
help with Get-Mailbox methods
these seem to work:
PS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimitedheissere heissere hermes unlimitedjarice jarice hermes unlimitedPat Trachsel trachsel hermes 90000KBMegan Sherwood-Pollard sherwood owlery unlimitedPS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias.Trim()}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedPS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias.ToString()}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimitedheissere heissere hermes unlimitedjarice jarice hermes unlimitedPat Trachsel trachsel hermes 90000KBPS H:>
PS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimitedheissere heissere hermes unlimitedjarice jarice hermes unlimitedPat Trachsel trachsel hermes 90000KBMegan Sherwood-Pollard sherwood owlery unlimitedPS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias.Trim()}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedPS H:> foreach($row in $table){Get-Mailbox -Identity $row.alias.ToString()}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimitedheissere heissere hermes unlimitedjarice jarice hermes unlimitedPat Trachsel trachsel hermes 90000KBPS H:>
help with Get-Mailbox methods
yep these worked. strange very similar to what I started with. Oh well will go from here.
PS H:> $table|%{$_.alias}dickeylindaaktatedvoshallhalfertyjbbradleheissere
PS H:> $table|%{Get-mailbox -Identity $_.alias}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimited
PS H:> $table|%{$_.alias}dickeylindaaktatedvoshallhalfertyjbbradleheissere
PS H:> $table|%{Get-mailbox -Identity $_.alias}
Name Alias ServerName ProhibitSendQuota---- ----- ---------- -----------------Michele Dickey-Kotz dickey owlery unlimitedLinda Armstrong LINDAA athena unlimitedktate ktate hermes unlimitedDavid Voshall dvoshall hermes unlimitedNancy Halferty halferty owlery unlimitedjbbradle jbbradle athena unlimited
help with Get-Mailbox methods
Marco
It works - looks liike some kind of interesting typo.
The need for teh "foreach" is because the "row" gets re-wrapped in a collection when passed in the pipeline. Seems to be a charcateristic of rowsets.
It works - looks liike some kind of interesting typo.
The need for teh "foreach" is because the "row" gets re-wrapped in a collection when passed in the pipeline. Seems to be a charcateristic of rowsets.