Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Azure Automation Powershell Version #70

Open
georgedavid29 opened this issue Oct 20, 2020 · 0 comments
Open

Bug in Azure Automation Powershell Version #70

georgedavid29 opened this issue Oct 20, 2020 · 0 comments

Comments

@georgedavid29
Copy link

the version of powershell run in azure automation has a bug for ps objects count when the value is 1.

sample code:

$myHashtable1 = @{
Name = 'Bob'
State = 'New York'
}

$myHashtable2 = @{
Name = 'Bob'
State = 'New York'
}

$myHashtable3 = @{
Name = 'Joe'
State = 'New Jersey'
}

$PSVersionTable

$MyPSObject = @()

$MyPSObject += [pscustomobject]$myHashtable1
$MyPSObject.Count
$MyPSObject += [pscustomobject]$myHashtable2
$MyPSObject.Count
$MyPSObject += [pscustomobject]$myHashtable3
$MyPSObject.Count

$justJoe = $MyPSObject | Where-Object { $_.Name -eq "Joe" }
$justJoe.Count # this will not return a value when it should
$justJoe | measure-object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant