List all previously-loaded PowerShell variables

ls variable:* should work, or Get-Variable. If these are resulting in bad output, it’s due to a poorly-implemented host, not with powershell itself. If you open the standard console host (run powershell.exe), you will see that these work fine.

If you need to work around a bad host, you might have better luck dumping everything to explicit strings:

Get-Variable | Out-String

or

Get-Variable |%{ "Name : {0}`r`nValue: {1}`r`n" -f $_.Name,$_.Value }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)