none
Couple of Intune questions

    Question

  • Hi all

    Just trying out an Intune trial and everything seems to be going well do far but I have a couple of early questions that I hope someone can help me with please.

    1. Is it possible to force an inventory refresh on devices? I've read somewhere that this is only done every 7 days or when certain tasks are done such as an app install. I've tried a sync from both the client and server side but this doesn't seem to refresh the app inventory. Is there a hidden option to force the inventory update or do I just have to be very patient? Devices are Windows 10 and set to Corporate so I should (I believe) be able to see the apps installed via the Intune portal.

    2. Using the automatic enrollment when connecting a device via AAD, is there a way that I can rename the device using a standard naming convention based on the devices serial number?

    That's it for now, any help will be very much appreciated...

    Matthew


    Tuesday, November 07, 2017 2:28 PM

All replies

  • 1. I think it refreshes if you check compliance using the company portal on the device.

    2. Not that I am aware of. Maybe if you deliver a provisioning package though?


    John Marcum | Microsoft MVP - Enterprise Client Management

    Tuesday, November 07, 2017 8:40 PM
  • Hello Matthew,

    1. Please see the following screenshot sourced from this article. In addition, for Windows 10 device, I would recommend to perform the Sync from the Settings -> Access or work school, choose the connected AAD account, and click Info, then perform the Sync action. 

    2. You can't rename the device from the Intune portal, you should change the computer name on the Windows 10 devices. After then, the new name will be updated in the Intune.

    Best regards,

    Andy Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, November 08, 2017 7:41 AM
  • Just with point 2 - this is possible, but you need to do it via a powershell script pushed down to the PC.  This will become much easier to do once the Intune Management Extensions are available, but until then - here is how I've managed to do it.

    1. Use this powershell script...

    #Get computer serial number $serialnumber = get-wmiobject win32_bios | select -expand serialnumber #Set Serial Number Prefix (if required) $company = "ABC" #This will set the name to eg. ABC123456 $newname = $company + $serialnumber #This actually does the rename rename-computer -NewName $newname -Force

    #Add registry entries so powershell runs successfully as an MSI
    New-Item -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall -Name RenameScript
    New-ItemProperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RenameScript -Name UninstallString -PropertyType String -Value 123456

    #Keep or delete the restart if you want to force a restart or not restart-computer -force

    2. Grab PS12EXE from here:

    https://github.com/pemo11/PS12EXE

    It'll convert a powershell script to a .exe file

    3. There are a number of programs that can convert .exe to .msi but the (free) one that I've used is from www.exemsi.com - which for some reason seems to be down at the moment.  

    Convert the powershell to an exe.  Convert the .exe to an .msi.  If you're using the exemsi program to convert your executable, pick a name to call your script, and make sure it's the same name mentioned in the registry entry the script adds.  This is to avoid an exit code 1601 logged in the application log when the MSI installs - which then reports as a failure in Intune even though it successfully ran.

     The end of the MSI installer sees the app has installed properly by looking for its name in the Uninstall registry - so that "new-item" cmdlet is just a way to say "If you can see this regkey, you've successfully installed".  The value I've put there of 123456 is just a place holder...you can put anything you want there, it's just so the MSI sees "something" and knows it was successful.

    Then in Intune, deploy your MSI as a Line of Business application to your group of users or devices that you wish to rename.  After the machines reboot and next check in with Intune, the name will automatically update.

    Hope this helps!


    http://www.dreamension.net


    Friday, November 10, 2017 2:39 AM