Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Remoting from a PS 3.0 server to a PS 2.0 client using CIM cmdlets.

$
0
0

I'm brand new to powershell and my first use is to retrieve information from client machines about printers. When working with a client machine that has PS 3.0 already installed it's pretty straight forward...

"Get-PrinterPort -ComputerName LabPC-002-32" Will return a list of ports in use.

Using the same command on a client that has PS 2.0 installed returns...

PS H:\> Get-PrinterPort -ComputerName LabPC-002-32
Get-PrinterPort : The spooler service is not reachable.  Ensure the spooler service is running.
At line:1 char:1
+ Get-PrinterPort -ComputerName LabPC-002-32
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_PrinterPort:ROOT/StandardCimv2/MSFT_PrinterPort) [Get-PrinterPort], CimException
    + FullyQualifiedErrorId : HRESULT 0x800706ba,Get-PrinterPort

I understand that in order to communicate with a v2.0 client I will need to used CIM cmdlets, but I'm new enough that I'm having trouble getting my head around the syntax. Can anyone provide or point me to an example of how to retrieve this kind of data from a 2.0 client?

Thanks,

Andy


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>