Discussion:
Win32_SessionDirectorySession in Powershell script
(too old to reply)
Foolke
2009-03-26 15:19:04 UTC
Permalink
Hi all,

With command "Get-WmiObject -List -ComputerName alv-pmf" i can see that
"Win32_SessionDirectoryServer" and "Win32_SessionDirectorySession" is
available on server alv-pmf.

When i use command "get-wmiobject -class "Win32_SessionDirectoryServer"
-namespace "root\CIMV2" -computername alv-pmf". I get output of al my
TS-servers.

When i use command "get-wmiobject -class "Win32_SessionDirectorySession"
-namespace "root\CIMV2" -computername alv-pmf" i get the following error:
Get-WmiObject : Provider is not capable of the attempted operation
At line:1 char:14
+ get-wmiobject <<<< -class "Win32_SessionDirectorySession" -namespace
"root\CIMV2" -computername alv-pmf

Anybody knows what i am doing wrong here?

Thx all,

Foolke
Vadims Podans
2009-03-26 18:40:12 UTC
Permalink
try to use filter:
gwmi Win32_SessionDirectorySession -computer "alv-pmf" -filter "servername =
'YourServerName'"
--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv
Post by Foolke
Hi all,
With command "Get-WmiObject -List -ComputerName alv-pmf" i can see that
"Win32_SessionDirectoryServer" and "Win32_SessionDirectorySession" is
available on server alv-pmf.
When i use command "get-wmiobject -class "Win32_SessionDirectoryServer"
-namespace "root\CIMV2" -computername alv-pmf". I get output of al my
TS-servers.
When i use command "get-wmiobject -class "Win32_SessionDirectorySession"
Get-WmiObject : Provider is not capable of the attempted operation
At line:1 char:14
+ get-wmiobject <<<< -class "Win32_SessionDirectorySession" -namespace
"root\CIMV2" -computername alv-pmf
Anybody knows what i am doing wrong here?
Thx all,
Foolke
Foolke
2009-03-27 14:15:02 UTC
Permalink
Post by Vadims Podans
gwmi Win32_SessionDirectorySession -computer "alv-pmf" -filter
"servername = 'YourServerName'"
Thx a lot Vadim using filter was the sollution

Loading...