Comments (3)
Is your $graphApiVersion
variable set to "beta"? If so, that would explain the difference in properties. The PowerShell SDK is generated against the v1.0 schema. For convenience, there is a cmdlet called Invoke-MSGraphRequest
to allow you to craft a custom call:
# Set the schema version to "beta"
Update-MSGraphEnvironment -SchemaVersion 'beta'
# Craft a custom call (the Get-MSGraphAllPages will automatically do paging and unwrap the values in all pages)
$result = Invoke-MSGraphRequest -Url 'deviceManagement/managedDevices?$select=hardwareInformation' | Get-MSGraphAllPages
from intune-powershell-sdk.
Hi Rohit,
Right, $graphApiVersion is set to 'beta'. After changing SDK schema ver. to 'beta' and calling via custom call everything works fine and I get what I need.
Thanks.
P.S. some additional feedback.
Hardware Information property now exists as well when running like:
(Get-DeviceManagement_ManagedDevices -managedDeviceId eb0872d3-3148-44fb-9b30-ffd66b156362).hardwareinformation
serialNumber :
totalStorageSpace : 0
freeStorageSpace : 0
imei :
meid :
manufacturer :
model :
phoneNumber :
subscriberCarrier :
cellularTechnology :
wifiMac :
operatingSystemLanguage :
isSupervised : False
isEncrypted : False
isSharedDevice : False
tpmSpecificationVersion :
operatingSystemEdition :
deviceFullQualifiedDomainName :
deviceGuardVirtualizationBasedSecurityHardwareRequirementState : meetHardwareRequirements
deviceGuardVirtualizationBasedSecurityState : running
deviceGuardLocalSystemAuthorityCredentialGuardState : running
sharedDeviceCachedUsers : {}
But it returns nothing (same as via raw HTTP call which is expected) so ?$select=hardwareInformation is used in HTTP call which does the trick. Would be good if 'beta' stuff would be available to Intune PS SDK so it would be possible to do :
Get-DeviceManagement_ManagedDevices -select hardwareInformation
and receive same thing as via custom call\http call.
from intune-powershell-sdk.
Thanks for the feedback Maksim. We are actually not generating the SDK for "beta" exactly for that reason: "beta" should not be used in production code.
from intune-powershell-sdk.
Related Issues (20)
- Unable to access deviceEnrollmentConfigurations via Get-IntuneDeviceEnrollmentConfiguration or Invoke-MSGraphRequest
- Missing support for the option appGroupType in New-IntuneAppProtectionPolicy
- New-IntuneRoleAssignment gives badrequest
- Get-IntuneManagedDevice returns all devices in a single result
- Get-IntuneDeviceConfigurationPolicy Encrypted omasettings
- Could not create IntuneAppProtectionPolicyiOS policy when assignments are provided HOT 2
- Get-IntuneMobileApp and Get-DeviceAppManagement_MobileApps not retrieving macOS LoB Apps
- This repo is missing important files HOT 2
- Where is Disconnect-MSGraph? HOT 1
- Get-AADGroupmember doesn't work on groups that have a source of Windows Server AD HOT 1
- Exclude Microsoft Intune PowerShell from Compliance Policy
- Security & Compliance Center connection error
- Exchange Online Prerequisite Check Failure HOT 1
- Unable to Connect-msgraph using client secret or cert
- Error on Invoke-IntuneManagedDeviceSyncDevice
- Error on New-MgDeviceManagementDeviceEnrollmentConfiguration HOT 1
- H
- Connect Graph issues
- Get-IntuneMobileApp Productversion parameter shows the wrong data
- Update-mgdevicemanagementmanageddevice -devicecategory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intune-powershell-sdk.