Forum Discussion
UPrint get ShareId in printer properties from Powershell
NerradPB Have you looked at the PowerShell documentation here - https://docs.microsoft.com/en-us/universal-print/fundamentals/universal-print-powershell?
You can get the same by trying the following sequence of commands:
> Connect-UPService
> $printers = Get-UPPrinter
> $printers[0].Share | Format-list
Hope this helps!
Thanks
Saurabh
- NerradPBAug 28, 2020Copper Contributor
Hi thanks for the reply, yes I've read through the documentation several times. Unless I'm really blind today (and often I am), Get-UpPrinter does not reveal the ShareId anywhere near as I can tell. It tells you IF it's shared, and what the share name is, but that's all.
That command doesn't seem to do anything for me. Returned no results.
- Saurabh_BansalAug 28, 2020
Microsoft
NerradPB Get-UPprinter returns "printers" object as a collection. Within the printer object, you will have "share" as object collection. Share object has ShareId, ShareName and CreatedDateTime as its properties.
Have you implemented all three commands in PowerShell that I listed above to see if it returns the ShareID?
> $printers = Get-UPPrinter
> $printers[0].Share[0].ShareID
Thanks,
Saurabh
- NerradPBAug 28, 2020Copper Contributor
Yes, as I mentioned in the previous reply.
"That command doesn't seem to do anything for me. Returned no results."