GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - startersclan/PSSourceQuery: Powershell implementation of Query and Rcon for Source and Goldsource games.

BranchesTags
Open more actions menu

Latest commit

 

History

108 Commits
108 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
build
build
 
 
src/PSSourceQuery
src/PSSourceQuery
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

PSSourceQuery

github-actions github-release powershell-gallery-release

Powershell implementation of Query and Rcon for Source and Goldsource games.

Install

Open powershell or pwsh and type:

Install-Module -Name PSSourceQuery -Repository PSGallery -Scope CurrentUser -Verbose

If prompted to trust the repository, hit Y and enter.

Usage

-Address may be a DNS or IP address.

-Verbose turns on verbose output for debugging.

Query

Import-Module PSSourceQuery

# Source Engine
# A2S_INFO query. Returns a hashtable of server metadata
SourceQuery -Address $address -Port $port -Engine 'Source' -Type 'info'
# A2S_PLAYER query. Returns a hashtable of players
SourceQuery -Address $address -Port $port -Engine 'Source' -Type 'players'
# A2S_RULES query, Returns a hashtable of server cvars
SourceQuery -Address $address -Port $port -Engine 'Source' -Type 'rules'
# A2A_PING query (deprecated). Returns a hashtable of whether the ping was successful
SourceQuery -Address $address -Port $port -Engine 'Source' -Type 'ping'

# Goldsource Engine
# A2S_INFO query - Returns a hashtable of server metadata
SourceQuery -Address $address -Port $port -Engine 'Goldsource' -Type 'info'
# A2S_PLAYER query. Returns a hashtable of players
SourceQuery -Address $address -Port $port -Engine 'Goldsource' -Type 'players'
# A2S_RULES query, Returns a hashtable of server cvars
SourceQuery -Address $address -Port $port -Engine 'Goldsource' -Type 'rules'
# A2A_PING query (deprecated). Returns a hashtable of whether the ping was successful
SourceQuery -Address $address -Port $port -Engine 'Goldsource' -Type 'ping'

Rcon

Import-Module PSSourceQuery

# Source Engine
SourceRcon -Address $address -Port $port -Password $rcon_password -Command 'status'

# Goldsource Engine
GoldsourceRcon -Address $address -Port $port -Password $rcon_password -Command 'status'

FAQ

Q: Prerequisites?

  • Powershell v5 and later or Powershell Core (aka pwsh)

Q: Verified games?

Engine Games
Source (srcds) cs2, csgo, hl2mp, left4dead2
Goldsource (hlds) cstrike, czero, valve. Should work for all hlds games.

The functions will probably work on a lot more games than those in the list.

Q: ping query not working for some games?

A2A_PING is no longer supported on Counter Strike: Source and Team Fortress 2 servers, and is considered a deprecated feature. See official documentation here for more information.

Notes

The functions are stateless - that is, SourceQuery, SourceRcon, and GoldsourceRcon are pure functions, storing no authentication or challenge states. This is to be expected for Source Queries, but not for Rcon. A possible future area of improvement would be to make SourceRcon and GoldsourceRcon construct and return a stateful Rcon object, that would improve client performance especially when multiple rcon commands need to be executed in sequence.

About

Powershell implementation of Query and Rcon for Source and Goldsource games.

Topics

goldsourcehldslibrarypowershellpwshrconsourcesourcequerysrcdssteamvalve

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.