Forum Discussion
NerradPB
Aug 27, 2020Copper Contributor
UPrint get ShareId in printer properties from Powershell
Hey there, I'm trying to apply permissions to 100 shared printers with Powershell but the none of the commands in the current module seem to have the ability to grab a shared printer's ShareId which ...
NerradPB
Aug 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_Bansal
Microsoft
Aug 28, 2020NerradPB 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