question

Jonathan Crowe avatar image
Jonathan Crowe asked

Powershell - How to set ServerType

Hey Folks, the link to New-PfBuild seems to be broken. I'm looking to set the ServerType via power shell.

I've guessed at the below but it doesnt work.

 New-PfBuild -BuildName ${NEW_BUILD_NAME} -ContainerFlavor ManagedWindowsServerCore -StartMultiplayerServerCommand 'C:\\Assets\\KoalaServer.exe' -GameAssetReferences $GameAssetRef -VMSize ${vmSize} -ServerType 'Process'

Cheers

5537-image.png

apis
image.png (57.7 KiB)
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.

Jonathan Crowe avatar image Jonathan Crowe commented ·

I've tried following this post https://community.playfab.com/questions/62477/create-a-multiplayer-server-build-with-powershell.html

But i end up with an error

 Code Error                       ErrorCode ErrorMessage                                                                                 Status
 ---- -----                       --------- ------------                                                                                 ------
 400  MultiplayerServerBadRequest 1382      MultiplayerServerBadRequest - ValidationError - There were errors during request validation. BadRequest
0 Likes 0 ·
Jonathan Crowe avatar image Jonathan Crowe Jonathan Crowe commented ·

It will upload the file data but it won't deploy it always return bad input parameters. I guess my commands are incorrectly formed for CreateBuildWithProcessBasedServerRequest . Could you give me a ps1 example?

 code status data
 ---- ------ ----
  200 OK    
    
 IsSuccessStatusCode : True
    
 Code Error         ErrorCode ErrorMessage             Status
 ---- -----         --------- ------------             ------
 400  InvalidParams 1000      Invalid input parameters BadRequest
0 Likes 0 ·

1 Answer

·
Neils Shi avatar image
Neils Shi answered

I tested the post you mentioned: Create a Multiplayer Server Build with PowerShell. It is a ps1 code sample and it works fine in my tests. You can double check your code to see if there are any difference or you can provide us your code for research.

10 |1200

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

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.