Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

I need a variable for the current value of the $email array

$
0
0

Trying to find a variable for the current value of the $email array, which goes through the list of email addresses in the specified csv


$email = @()

Import-CSV C:\CSV\DisabledScholen1.csv | ForEach-Object {$email += $_.userprincipalname}

$email | ForEach-Object {Get-Mailbox -ResultSize Unlimited -Database GHA | Where {$_.PrimarySmtpAddress -like 'currentvalueofemail'} | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize,ItemCount,StorageLimitStatus} | Export-CSV C:\CSV\pleasework1.csv


Duramaxster


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>