PowerShell script to access Oracle system views I am using PowerShell script to access oracle 11g's system views 
as  SELECT COUNT (*) AS COUNT FROM v$session but I keep getting "ORA-00942: table or view does not exist"

I have created a user with sysdba privilege and all connections are a fine as I can even query other schemas without errors, but I only get error when I access any system views. can anyone tell me what I am doing wrong?

I also gave permission as "GRANT SELECT on v_$session TO mynewuser even tho I know its not needed if the user has sysdba.
What powershell syntax are you using?

If you do not enclose the select between single quotes, Powershell will treat it like a variable. If that's the problem, please try:

$command.CommandText = 'SELECT COUNT (*) AS COUNT FROM v$session'