microsoftgraph / powershell-intune-samples

This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
MIT License
1.37k stars 658 forks source link

DeviceConfiguration_Import_FromJSON.ps1 not working #209

Open MDanihy opened 2 years ago

MDanihy commented 2 years ago

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string. At D:\Desktop\Endpoint\DeviceConfiguration_Import_FromJSON.ps1:312 char:21

You cannot call a method on a null-valued expression. At D:\Desktop\Endpoint\DeviceConfiguration_Import_FromJSON.ps1:319 char:1

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string. At D:\Desktop\Endpoint\DeviceConfiguration_Import_FromJSON.ps1:321 char:16

Get-Content : Cannot bind argument to parameter 'Path' because it is an empty string. At D:\Desktop\Endpoint\DeviceConfiguration_Import_FromJSON.ps1:332 char:17

ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null. At D:\Desktop\Endpoint\DeviceConfiguration_Import_FromJSON.ps1:335 char:30

LSTEK commented 2 years ago

I was using this to do a production migration but got stuck here. if it helps i went back a few versions and got it working. https://github.com/microsoftgraph/powershell-intune-samples/releases/tag/203934 (this is the version i used)