To query a remote database with a PowerShell command, you can use the Invoke-Sqlcmd cmdlet. This cmdlet allows you to run SQL commands against a database server from within a PowerShell script. You will need to provide the necessary connection information such as server name, database name, username, and password in order to establish a connection. Once the connection is established, you can write and execute SQL queries against the remote database using the Invoke-Sqlcmd cmdlet.