MicrosoftDocs / sccm-docs-powershell-ref

Configuration Manager PowerShell documentation public repo
https://docs.microsoft.com/powershell/sccm/configurationmanager/
Creative Commons Attribution 4.0 International
26 stars 61 forks source link

Could be improved by providing information on output #20

Closed JuliusPIV closed 4 years ago

JuliusPIV commented 5 years ago

Hi Team. The documentation for Get-CMUserDeviceAffinity could be improved by providing output examples and an explanation of said output, like what Sources and Types mean and valid values for both.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

codeX004 commented 5 years ago

Would be great if further output information could be provided....

JuliusPIV commented 4 years ago

Agreed @codeX378 but for what its worth, a year ago I poked around a bit and it seemed like for Sources: 1 = Catalog Defined 2 = Administrator 4 = Usage Agent Defined 6 = OSD Defined I can't figure out what 7 means other than maybe the user listed in UniqueUserName has logged into the machine at least once OR I suppose it could be a combination of 1+6.

As for Types it seems as though 1 means the user listed in UniqueUserName has been assigned as a Primary User of the device and if it's null/empty then they are not listed as a Primary User.

aczechowski commented 4 years ago

For cmdlets like this, look at the Outputs section, and then cross-reference with the WMI SDK docs. In this example, the output is SMS_UserMachineRelationship. You can find more information on the properties of this class at SMS_UserMachineRelationship server WMI class. However, in this case, that article doesn't have any information about the values of the property. 😢

So I'll do two things to fix this issue. As I'm updating cmdlet articles, if they have an output for a WMI class, I'm adding a link to that article. That article should be the source for the properties of the object. I'll also add the data that @JuliusPIV collected to the WMI class article. I'll do some further poking to see if I can get some additional info to include. But I think something is better than nothing at this point.

Thanks for the feedback!

aczechowski commented 4 years ago

Ah, I found a list in a related article for the CreateRelationship method. The first four align with what I found in the MOF for the WMI class, so I assume the others are in numerical order as well. So 7 should be for Fast Install. (see that article for more of a description)

aczechowski commented 4 years ago

I've put in changes for both articles. This issue will auto-close when my changes merge, and then will be live with the next daily publishing cycle. Thanks again for the feedback!

JuliusPIV commented 2 years ago

Hi @aczechowski I don't think I ever thanked you for this so: Thank you! I really appreciate the guidance and adjustment.