question

contact-17 avatar image
contact-17 asked

How to get buildid from Get-PfBuild using PowerShell

Was wondering how do I get the buildid from Get-PfBuild using Powershell?

apis
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

contact-17 avatar image contact-17 commented ·

I've noticed also that the json conflicts with powershell as well. This is the output.

I also notice if I try to grab the fields using ConvertFrom-Json it only gives me the 200 code.

0 Likes 0 ·

1 Answer

·
Rick Chen avatar image
Rick Chen answered

The following command List all builds including the build id:

Get-PfBuild | ConvertTo-Json -depth 7

You can refer to this document: MpsPowershell/Get-PfBuild.md at main PlayFab/MpsPowershell GitHub

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

contact-17 avatar image contact-17 commented ·

Hi @Rick Chen

Oh I understand that command, but how do I grab say the first builid and save it as a string/variable?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ contact-17 commented ·

One way is that

$result = Get-PfBuild

$result.Data.BuildSummaries[0].BuildId

A simpler way is

(Get-PfBuild).Data.BuildSummaries[0].BuildId

This question is not related to PlayFab, please search the Powershell document for help.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.