shell-intune-samples icon indicating copy to clipboard operation
shell-intune-samples copied to clipboard

Device rename by using local csv file

Open Smarthome-Creator opened this issue 1 year ago • 1 comments

I know it is a feature request and not an issue but i hope u can help me.

Renaming the device according to its serial number is not really practical. It's easier to find a device by a unique hostname. And that's my idea, can you write a script that makes it possible to load a CSV file on the Mac that contains the serial number with associated hostname and if the serial number finds a match in the CSV file sets the corresponding hostname?

The logical buildup:

(CSV file) Serial number: Hostname: XXXXXXXXXXXXX = MBXXXX (MB for MacBook) XXXXXXXXXXXXX = MMXXXX (MM for Mac mini) and so on.

The script finds the matching serial number and gives the Mac the correct host name.

Smarthome-Creator avatar Jun 19 '24 13:06 Smarthome-Creator

Hi there,

You could write this yourself today via Graph. You wouldn’t run it on each device, but as a service script that renamed devices as they were added to Intune.

You can find more here : Working with Intune in Microsoft Graph - Microsoft Graph v1.0 | Microsoft Learnhttps://learn.microsoft.com/en-us/graph/api/resources/intune-graph-overview?view=graph-rest-1.0

From: Smarthome-Creator @.> Date: Wednesday, 19 June 2024 at 14:12 To: microsoft/shell-intune-samples @.> Cc: Subscribed @.***> Subject: [microsoft/shell-intune-samples] Device rename by using local csv file (Issue #141)

I know it is a feature request and not an issue but i hope u can help me.

Renaming the device according to its serial number is not really practical. It's easier to find a device by a unique hostname. And that's my idea, can you write a script that makes it possible to load a CSV file on the Mac that contains the serial number with associated hostname and if the serial number finds a match in the CSV file sets the corresponding hostname?

The logical buildup:

(CSV file) Serial number: Hostname: XXXXXXXXXXXXX = MBXXXX (MB for MacBook) XXXXXXXXXXXXX = MMXXXX (MM for Mac mini) and so on.

The script finds the matching serial number and gives the Mac the correct host name.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/shell-intune-samples/issues/141 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGOC2JNDDAM55D7NBX4NUODZIF7T3BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJSG43DKMJZHA3DBAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDEMZWGIZTKNJTHA42O5DSNFTWOZLSUZRXEZLBORSQ. You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

theneiljohnson avatar Jun 19 '24 13:06 theneiljohnson