msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Get-MgDevice -Search "displayName:XYZ" returns XYZ AND ABC

Open oingobo opened this issue 9 months ago • 0 comments

Describe the bug

I'm deleting EntraID device records and the search returns a display name match and another device that DOES NOT match the display name. When performing bulk delete on a display name this is a major issue.

Expected behavior

Search and return only the device with the matching displayname.

How to reproduce

Get-MgDevice -Search "displayName:$Computer" -CountVariable CountVar -ConsistencyLevel eventual -ErrorAction Stop

SDK Version

2.18.0

Latest version known to work for scenario above?

Don't know.

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

PSVersion                      5.1.22621.2506
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2506
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

### Other information

_No response_

oingobo avatar May 09 '24 15:05 oingobo