Forum Discussion
UPrint get ShareId in printer properties from Powershell
NerradPB - the only reason I see that happening is when the printer is not shared. When you Get-UPPrinter, what does it say against printer's "IsShared" and "Share" properties?
Here is the output from what I run:
> $myprinter = Get-UPPrinter | where-object {$_.Name -eq "printer_shared"}
> $myprinter |Format-List
PrinterId : f10a7a74-a2a0-421a-97ff-258a68979d83
Name : printer_shared
Manufacturer : Test
Model : Test
RegisteredBy :
RegisteredDateTime : 8/28/2020 7:03:05 PM +00:00
Status : Microsoft.UPManagement.Models.PrinterStatus
Capabilities :
IsShared : True
Location : Microsoft.UPManagement.Models.PrinterLocation
Jobs :
Share : Microsoft.UPManagement.Models.PrinterShare
Connectors : {}
>
If I run it for a printer that is not shared, here is what I get:
> $myprinter1 = Get-UPPrinter | where-object {$_.Name -eq "printer_not_shared"}
> $myprinter1 |Format-List
PrinterId : 5aa18aaa-93f7-4884-8919-c8ccded505ff
Name : printer_not_shared
Manufacturer : Test
Model : Test
RegisteredBy :
RegisteredDateTime : 8/28/2020 10:05:00 PM +00:00
Status : Microsoft.UPManagement.Models.PrinterStatus
Capabilities :
IsShared : False
Location : Microsoft.UPManagement.Models.PrinterLocation
Jobs :
Share :
Connectors : {}
>
If you continue to face issues, I recommend reaching out to Support via https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest
Hi, Yes I can get all of that information when I run get-upprinter but the output you're showing me isn't from the same script that you posted in your first reply.
In any case, none of that gives you the ShareID property, which is required to apply permissions using the grant-upaccess command
- Saurabh_BansalSep 08, 2020
Microsoft
NerradPB, I recommend reaching out to Support via https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest