@mehdidakhama-6198, Based as I know the script we download from Intune is identified with id. So on local computer, we can only see the id in both registry key and log file. To find out the script name of the id, we can get it from intune Graph:
Here is the test I have done in my lab
In my log and registry , I find my script id is as below:
Then open Powershell ISE with administrator permission, and run the following script:
Import-Module Microsoft.Graph.Intune #import intune module
Update-MSGraphEnvironment -SchemaVersion beta #set schema version as beta
Connect-MSGraph #connect to MS grasp
Function Get-IScript {
<#
.SYNOPSIS
Get-IScript retrieves one or more scripts.
.DESCRIPTION
Get-IScript retrieves one or more scripts.
.PARAMETER id
The id of the script policy.
.EXAMPLE
Get-IScript -id "script id"
#>
Param($id)
$URI = "deviceManagement/deviceManagementScripts"
$IntuneScripts = Invoke-MSGraphRequest -HttpMethod GET -Url $URI
If ($IntuneScripts.value)
{
$IntuneScripts = $IntuneScripts.value
}
$IntuneScript = $IntuneScripts | Where {$_.id -eq $id}
If ($id)
{
Return $IntuneScript
}
else
{
Return $IntuneScripts
}
}
It will pop windows and needs to enter intune administrator credential
After it is connected, run the command like below:
Get-IScript -id "script id" | fl filename
Note: Please change the script id to the one in your environment.
Then we can get the name:
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.