Skip to content

Search

Captain 365

Captain 365

Exploring the Azure blue seas

  • Home
  • Captains Blog
    • Microsoft 365
    • Office 365
    • Powershell
    • Azure Cloud
    • Azure Security
  • Captains Knowledgebase
  • About

Captain 365

Powershell will always return array and $array.count wil always be a number.

09-06-2021 by Captain 365

Powershell Gotcha:If you want to guarantee that you always get an array from a function, wrap the call with @(). $m = @(Get-AzureADGroupMember -ObjectId $g )$m.count will always be a number.

Categories Powershell Leave a comment

Search this Ship

Recent Posts

  • Test syncblock3
  • Linux Commands
  • How to Stop Procrastinating [VIDEO]
  • Elementor #478
  • Create a Shortcut to start Apps with Admin privileges with Powershell

Some usefull Links

Captains Github

Categories

© 2025 Captain 365 • Built with GeneratePress