Closed spalnitkar closed 3 years ago
Hi @spalnitkar,
Can you test using powershell 5.0, the pre-reqs in the readme list PS v5.0, scripts haven't been tested with PS.
PowerShell v5.0 on Windows 10 x64 (PowerShell v4.0 is a minimum requirement for the scripts to function correctly)
Dave
Thank you so much for the prompt response:
I tried it with powershell 5 and go the following errors:
PS C:\tools\m365\scripts\Intune\MacOS\intune> .\MacOS_MDATP_Deployment_Add.ps1 -OnboardingXMLFilePath 'C:\tools\m365\scripts\Intune\MacOS\intune\WindowsDefenderATPOnboarding.xml' At C:\tools\m365\scripts\Intune\MacOS\intune\MacOS_MDATP_Deployment_Add.ps1:170 char:21
Hi @spalnitkar,
How are you creating the script, are you copying the raw content from github?
Looks like your getting invalid characters on the download, so would be good to know how your getting the script locally.
Thanks
Dave
Hi @davefalkus
I am using Microsoft Edge and right-clicking the script name and selecting "Save Link As" to download it to my local machine.
Thanks,
Sanjay
Hi @davefalkus,
Thank you so much for the pointer; copying and pasting the raw content and creating the file seems to work.
Thanks,
Sanjay
If I repro the "Save Link As" then I get the HTML output
Could you open the link below: https://raw.githubusercontent.com/microsoftgraph/powershell-intune-samples/master/MDATP/MacOS_MDATP_Deployment_Add.ps1
Select All text then copy and create a ps1 script and retest?
Thanks
Dave
@davefalkus, yes it works when I do that. Thanks again for your prompt replies.
Thanks @spalnitkar, happy to help.
Will close the issue.
Dave
I am encountering an error when I try to run the above script for MacOS MDATP deployment.
The error is: ParserError: C:\intune\MacOS_MDATP_Deployment_Add_Assign.ps1:197 Line | 197 | … ata-ga-click="(Logged out) Header, go to Features">Features <span cla … | ~ | The '<' operator is reserved for future use.
I am using the latest Powershell (64) version 7; according the the documentation, the first time the script is run if should prompt for credentials to log in to the tenant; however I get the above error and cannot proceed.