0

So I've used the where command a lot with Powershell, but for some reason it doesn't want to work with me in this instance.

$blockdata | select userprincipalname, blockcredential | where blockcredential -eq False

I simply want to return the items in blockdata that are not blocked (False). blockdata has the userprincipalname and blockcredential for multiple people. I tried to only grab users with a 'False' blockcredential when I made the blockdata varaiable, but even therer it wouldn't work"

$block = $upns | % {
   Get-MsolUser -UserPrincipalName $_.userprincipalname | select userprincipalname, blockcredential | where blockcredential -eq False
   }

I've tried putting quotes around false, but it doesn't help. Still just returns nothing. Can anyone help me out? This is what $block looks like when I out it through the where statement... enter image description here

Luke K
  • 335
  • 3
  • 5
  • 13

0 Answers0