I am writing some powershell foreach loops and wanted to make sure that I had this portion of the command understood:
if I set a variable such as $List $List = Get-mailbox
and then I create a foreach loop like so
ForEach($NewUser in $NewUsers){New-MsolUser –UserPrincipalName $NewUser.UserPrincipalName –DisplayName $NewUser.DisplayName –FirstName $NewUser.Firstname –LastName $NewUser.LastName –Password $NewUser.Password –Department $NewUser.Department –UsageLocation $NewUser.UsageLocation –LicenseAssignment $Sku.AccountSkuId}
I am confused on this part of the command ForEach($NewUser << in $NewUsers)
The $NewUser is not defined anywhere? I think I have it understood but would like to know if some can help clear up my confusions.
Thanks,
Robert
Robert