We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!
Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.
I need your help, I am trying to fetch the last successfull sync event from Azure AD and show this to Dekstop info. So far I have come up with this, as you can see the registry path is dynamic and different for every user so I first need to read the connection string to be able to get the correct key from the registry so I can translate this value into a date time.
If I use the direct path it works, but If I use the variable with the same value i get N/A displayed.
#Query Registry forLast Sync
SET=key:Accounts,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\OMADM\Accounts
TEXT=display:%Accounts%
REG=active:1, value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DeclaredConfiguration\HostOS\Config\enrollments\_Container_EnrollmentId, set:EnrollmentId, hidden:1
TEXT=display:%EnrollmentId%
SET ServerLastSuccessTime=%Accounts%\%EnrollmentId%\Protected\ConnInfo\ServerLastSuccessTime
TEXT=display:%ServerLastSuccessTime%
#Enabling this it works
#REG=active:1, value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\OMADM\Accounts\8725CE8A-DBC1-48CB-9678-98D822546245\Protected\ConnInfo\ServerLastSuccessTime, set:AzureSynced, hidden:1
#using this variable it does not work
REG=active:1, value:%ServerLastSuccessTime%, set:AzureSynced, hidden:1
TEXT=active:1, text:Azure Synced,font-face:Tahoma,font-size:90%,display:%AzureSynced%
Looks like none of the REG items support variables. I've added it in. I expect to get v3.18.1 out later this week.
I wanted to express my gratitude on behalf of LDI (colleague) and myself for adding the REG items support variables. Your efforts are greatly appreciated. It's fantastic to hear that you expect to get v3.18.1 out later this week.
We are going to make a donation and hope that it helps with the repairs to your house after the storm.
Thank you once again for your hard work and dedication, stay awesome!
With the new release of v3.18.1 you can now use variables to get the correct value from the registry to read out and display the last Azure sync.
So to help everybody, i will share what I am using in my desktopinfo.ini (you need to use 64 bit DesktopInfo)
#Query Registry forLast Sync SET=key:Accounts,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\OMADM\Accounts REG=active:1, value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DeclaredConfiguration\HostOS\Config\enrollments\_Container_EnrollmentId, set:EnrollmentId, hidden:1 SET ServerLastSuccessTime=%Accounts%\%EnrollmentId%\Protected\ConnInfo\ServerLastSuccessTime REG=active:1, value:%ServerLastSuccessTime%, set:AzureSynced, hidden:1 TEXT=active:1, text:Azure synced at, font-face:Tahoma, font-size:90%, display:%AzureSynced%[sub:7:2]-%AzureSynced%[sub:5:2]-%AzureSynced%[sub:1:4] %AzureSynced%[sub:10:2]:%AzureSynced%[sub:12:2]
Thanks @glenn 😉