Can't upload powershell script to Intune compliance policy - custom scripts

Djordje Novakovic 626 Reputation points
2023-08-25T14:47:42.91+00:00

Hello,

I am trying to upload powershell script to Compliance policies > Scripts:

$nessus = Get-Package -Name 'Nessus Agent (x64)' -ErrorAction SilentlyContinue 
$nessusinstalled = $nessus.Name 
$hash = @{Name = $nessusinstalled} 
return $hash | ConvertTo-Json -Compress

However, when I click Save - nothing happens.

There is no error message.

When I run it on my local machine there is result:

User's image

Screenshot from Intune here:

User's image

Can anyone test this in your environment?

Same situation here: https://www.reddit.com/r/Intune/comments/108e3bj/custom_compliance_policies_scripts_not_uploading/

Thanks

Microsoft Intune Compliance
Microsoft Intune Compliance
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Compliance: Adhering to rules, standards, policies, and laws.
163 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,043 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 48,581 Reputation points Microsoft Vendor
    2023-08-28T01:32:02.71+00:00

    @Djordje Novakovic, Thanks for posting in Q&A. Based on my test, I had the same issue as yours. Then I go to check internally and notice there's a known issue with compliance related service failing in the background. And the issue is still in processing. You can wait the issue to be fixed or open case to speed up it. Herer is a link with the steps to open case:

    https://video2.skills-academy.com/en-us/mem/get-support

    Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.