@Woody Chiu at RASI Thanks for posting in our Q&A.
If you use BYOD enrollment method to enroll devices, ownership will show personal. If you use other enrollment method (for example: GPO enrollment, autopilot enrollment) to enroll devices, ownership will show corporate. We can check the ownership value:
So, (device.deviceOwnership -eq "Company") means filter the devices that ownership shows corporate.
(device.deviceOwnership -eq "Personal") means filter the device that ownership shows personal. We always called them the personal devices that enrolled to intune.
To clarify this issue, how did you define company devices? Devices are enrolled to intune and no matter its ownership shows corporate or personal? Or only its ownership shows corporate can be called company device?
If there is anything update, feel free to let us know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.