Hi Team, I am looking for a PowerShell script to extract system hash value from device and save into network path. I have below commands and manually it is running fine and giving me the result too. But, if I run this command using Powershell script from Intune. It is getting failed. Any suggestion will be appreciated.
Set-Location -Path
$env:Path += ";C:\Program Files\WindowsPowerShell\Scripts"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force
Install-Script -Name Get-WindowsAutoPilotInfo
Get-WindowsAutoPilotInfo -OutputFile "$env:computername AutoPilotHWID.csv"