Are you using aadconnect, but want your users to be able to update your Office 365 distribution lists directly in OWA (Outlook Web Access)? And still keep them in sync with your Active Directory?
Thenย stay tuned ๐
Are you using aadconnect, but want your users to be able to update your Office 365 distribution lists directly in OWA (Outlook Web Access)? And still keep them in sync with your Active Directory?
Thenย stay tuned ๐
One thing that annoys me in Powershell is it’s tendency to automatically cast arrays with 1 object to a normal object, thus you can’t do $array[0] anymore or use .Count (unless using PS v3+).
You can’t really ensure your methods/functions always return a proper array, they might be empty or they might have been converted to an object. Here’s how to force anything into an array, always, and to make sure there are no ’empty’ objects that mess up the array’s count property:
[Array]$result = @(myFunctionCall | where {$_})[Array] and @() make sure that $result becomes an array, while | where {$_} ensures that there are no empty values ๐