SOLVED

UPrint get ShareId in printer properties from Powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-1617331%22%20slang%3D%22en-US%22%3EUPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1617331%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20there%2C%20I'm%20trying%20to%20apply%20permissions%20to%20100%20shared%20printers%20with%20Powershell%20but%20the%20none%20of%20the%20commands%20in%20the%20current%20module%20seem%20to%20have%20the%20ability%20to%20grab%20a%20shared%20printer's%20ShareId%20which%20is%20a%20requirement%20of%20the%20Grant-UPAccess%20command.%20I%20have%20to%20look%20them%20up%20tediously%20one%20by%20one%20in%20the%20portal%20and%20I%20may%20as%20well%20just%20add%20the%20groups%20by%20hand%20while%20I'm%20there%20if%20I'm%20doing%20that.%20Am%20I%20missing%20something%20or%20is%20that%20something%20coming%20in%20the%20future%20to%20the%20module%20perhaps%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1617873%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1617873%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773788%22%20target%3D%22_blank%22%3E%40NerradPB%3C%2FA%3E%26nbsp%3BHave%20you%20looked%20at%20the%20PowerShell%20documentation%20here%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Funiversal-print%2Ffundamentals%2Funiversal-print-powershell%3F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Funiversal-print%2Ffundamentals%2Funiversal-print-powershell%3F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20get%20the%20same%20by%20trying%20the%20following%20sequence%20of%20commands%3A%3C%2FP%3E%0A%3CP%3E%26gt%3B%20Connect-UPService%3C%2FP%3E%0A%3CP%3E%26gt%3B%20%24printers%20%3D%20Get-UPPrinter%3C%2FP%3E%0A%3CP%3E%26gt%3B%26nbsp%3B%24printers%5B0%5D.Share%20%7C%20Format-list%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20helps!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%0A%3CP%3ESaurabh%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1619147%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619147%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F572522%22%20target%3D%22_blank%22%3E%40Saurabh_Bansal%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20thanks%20for%20the%20reply%2C%20yes%20I've%20read%20through%20the%20documentation%20several%20times.%20Unless%20I'm%20really%20blind%20today%20(and%20often%20I%20am)%2C%20Get-UpPrinter%20does%20not%20reveal%20the%20ShareId%20anywhere%20near%20as%20I%20can%20tell.%20It%20tells%20you%20IF%20it's%20shared%2C%20and%20what%20the%20share%20name%20is%2C%20but%20that's%20all.%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20command%20doesn't%20seem%20to%20do%20anything%20for%20me.%20Returned%20no%20results.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1619977%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619977%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773788%22%20target%3D%22_blank%22%3E%40NerradPB%3C%2FA%3E%26nbsp%3BGet-UPprinter%20returns%20%22printers%22%20object%20as%20a%20collection.%20Within%20the%20printer%20object%2C%20you%20will%20have%20%22share%22%20as%20object%20collection.%20Share%20object%20has%20ShareId%2C%20ShareName%20and%20CreatedDateTime%20as%20its%20properties.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20implemented%20all%20three%20commands%20in%20PowerShell%20that%20I%20listed%20above%20to%20see%20if%20it%20returns%20the%20ShareID%3F%3C%2FP%3E%0A%3CP%3E%26gt%3B%26nbsp%3B%24printers%20%3D%20Get-UPPrinter%3C%2FP%3E%0A%3CP%3E%26gt%3B%26nbsp%3B%24printers%5B0%5D.Share%5B0%5D.ShareID%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3ESaurabh%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1620016%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1620016%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F572522%22%20target%3D%22_blank%22%3E%40Saurabh_Bansal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20as%20I%20mentioned%20in%20the%20previous%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3CSPAN%3EThat%20command%20doesn't%20seem%20to%20do%20anything%20for%20me.%20Returned%20no%20results.%22%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1620289%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1620289%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773788%22%20target%3D%22_blank%22%3E%40NerradPB%3C%2FA%3E%26nbsp%3B-%20the%20only%20reason%20I%20see%20that%20happening%20is%20when%20the%20printer%20is%20not%20shared.%20When%20you%20Get-UPPrinter%2C%20what%20does%20it%20say%20against%20printer's%20%22IsShared%22%20and%20%22Share%22%20properties%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20the%20output%20from%20what%20I%20run%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26gt%3B%20%24myprinter%20%3D%20Get-UPPrinter%20%7C%20where-object%20%7B%24_.Name%20-eq%20%22printer_shared%22%7D%3C%2FP%3E%0A%3CP%3E%26gt%3B%20%24myprinter%20%7CFormat-List%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPrinterId%20%3A%20f10a7a74-a2a0-421a-97ff-258a68979d83%3CBR%20%2F%3EName%20%3A%20printer_shared%3CBR%20%2F%3EManufacturer%20%3A%20Test%3CBR%20%2F%3EModel%20%3A%20Test%3CBR%20%2F%3ERegisteredBy%20%3A%3CBR%20%2F%3ERegisteredDateTime%20%3A%208%2F28%2F2020%207%3A03%3A05%20PM%20%2B00%3A00%3CBR%20%2F%3EStatus%20%3A%20Microsoft.UPManagement.Models.PrinterStatus%3CBR%20%2F%3ECapabilities%20%3A%3CBR%20%2F%3E%3CFONT%20color%3D%22%2300FF00%22%3EIsShared%20%3A%20True%3C%2FFONT%3E%3CBR%20%2F%3ELocation%20%3A%20Microsoft.UPManagement.Models.PrinterLocation%3CBR%20%2F%3EJobs%20%3A%3CBR%20%2F%3E%3CFONT%20color%3D%22%2300FF00%22%3EShare%20%3A%20Microsoft.UPManagement.Models.PrinterShare%3C%2FFONT%3E%3CBR%20%2F%3EConnectors%20%3A%20%7B%7D%3C%2FP%3E%0A%3CP%3E%26gt%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20I%20run%20it%20for%20a%20printer%20that%20is%20not%20shared%2C%20here%20is%20what%20I%20get%3A%3C%2FP%3E%0A%3CP%3E%26gt%3B%20%24myprinter1%20%3D%20Get-UPPrinter%20%7C%20where-object%20%7B%24_.Name%20-eq%20%22printer_not_shared%22%7D%3C%2FP%3E%0A%3CP%3E%26gt%3B%20%24myprinter1%20%7CFormat-List%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPrinterId%20%3A%205aa18aaa-93f7-4884-8919-c8ccded505ff%3CBR%20%2F%3EName%20%3A%26nbsp%3Bprinter_not_shared%3CBR%20%2F%3EManufacturer%20%3A%20Test%3CBR%20%2F%3EModel%20%3A%20Test%3CBR%20%2F%3ERegisteredBy%20%3A%3CBR%20%2F%3ERegisteredDateTime%20%3A%208%2F28%2F2020%2010%3A05%3A00%20PM%20%2B00%3A00%3CBR%20%2F%3EStatus%20%3A%20Microsoft.UPManagement.Models.PrinterStatus%3CBR%20%2F%3ECapabilities%20%3A%3CBR%20%2F%3E%3CFONT%20color%3D%22%2300FF00%22%3EIsShared%20%3A%20False%3C%2FFONT%3E%3CBR%20%2F%3ELocation%20%3A%20Microsoft.UPManagement.Models.PrinterLocation%3CBR%20%2F%3EJobs%20%3A%3CBR%20%2F%3E%3CFONT%20color%3D%22%2300FF00%22%3EShare%20%3A%3C%2FFONT%3E%3CBR%20%2F%3EConnectors%20%3A%20%7B%7D%3C%2FP%3E%0A%3CP%3E%26gt%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20continue%20to%20face%20issues%2C%20I%20recommend%20reaching%20out%20to%20Support%20via%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%23blade%2FMicrosoft_Azure_Support%2FHelpAndSupportBlade%2Fnewsupportrequest%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fportal.azure.com%2F%23blade%2FMicrosoft_Azure_Support%2FHelpAndSupportBlade%2Fnewsupportrequest%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1623070%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1623070%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F572522%22%20target%3D%22_blank%22%3E%40Saurabh_Bansal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BHi%2C%20Yes%20I%20can%20get%20all%20of%20that%20information%20when%20I%20run%20get-upprinter%20but%20the%20output%20you're%20showing%20me%20isn't%20from%20the%20same%20script%20that%20you%20posted%20in%20your%20first%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20any%20case%2C%20none%20of%20that%20gives%20you%20the%20ShareID%20property%2C%20which%20is%20required%20to%20apply%20permissions%20using%20the%20grant-upaccess%20command%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NerradPB_0-1598886438544.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F215572i5AEACD6EF1E11A86%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22NerradPB_0-1598886438544.png%22%20alt%3D%22NerradPB_0-1598886438544.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NerradPB_1-1598886657167.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F215580i5BE11D68CD485521%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22NerradPB_1-1598886657167.png%22%20alt%3D%22NerradPB_1-1598886657167.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1643221%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643221%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773788%22%20target%3D%22_blank%22%3E%40NerradPB%3C%2FA%3E%2C%20I%20recommend%20reaching%20out%20to%20Support%20via%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%23blade%2FMicrosoft_Azure_Support%2FHelpAndSupportBlade%2Fnewsupportrequest%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fportal.azure.com%2F%23blade%2FMicrosoft_Azure_Support%2FHelpAndSupportBlade%2Fnewsupportrequest%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1643348%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643348%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F773788%22%20target%3D%22_blank%22%3E%40NerradPB%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20get%20the%20shareID%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-UPPrinter%20%7C%20select%20-ExpandProperty%20share%20%7C%20select%20sharename%2Cshareid%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20I%20can%20share%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrant-UPAccess%20-GroupId%20xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx-ShareID%20xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1731489%22%20slang%3D%22en-US%22%3ERe%3A%20UPrint%20get%20ShareId%20in%20printer%20properties%20from%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1731489%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F681030%22%20target%3D%22_blank%22%3E%40KurtJc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20mang%2C%20that%20worked%20a%20treat.%20I%20don't%20recall%20that%20option%20being%20available%20in%20the%20previous%20module%20update%20but%20I%20may%20have%20missed%20it.%20Cheers!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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 is a requirement of the Grant-UPAccess command. I have to look them up tediously one by one in the portal and I may as well just add the groups by hand while I'm there if I'm doing that. Am I missing something or is that something coming in the future to the module perhaps? 

 

Thanks

9 Replies

@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

 

@Saurabh_Bansal

 

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.

 

 

@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

 

@Saurabh_Bansal 

 

Yes, as I mentioned in the previous reply. 

 

"That command doesn't seem to do anything for me. Returned no results."

@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 

 

@Saurabh_Bansal 

 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

NerradPB_0-1598886438544.png

NerradPB_1-1598886657167.png

 

best response confirmed by Saurabh_Bansal (Microsoft)
Solution

@NerradPB 

 

I can get the shareID like this:

 

Get-UPPrinter | select -ExpandProperty share | select sharename,shareid

 

Then I can share like this:

 

Grant-UPAccess -GroupId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx-ShareID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

 

@KurtJc 

Thanks mang, that worked a treat. I don't recall that option being available in the previous module update but I may have missed it. Cheers!