Automate the import of data from CSV/Excel

Modified on Fri, 17 Jun, 2022 at 12:45 PM

# Define the Import Contract – Needs to be on the server somewhere. Use the portal to upload it if you do not have access

$contractFilePath = "$($ScriptArgs.ReportsFolder)\..\Scripts\ImportContracts\ImportContract.txt"

 

# Do the import

$ImportEvent = Import-MsModuleData -Module Applications -ImportFilePath "D:\MStudioImportFolder\ImportFile.csv" -ContractFile $contractFilePath

 

# Log the results, these are the same as you see in the UI

Write-MSDebug -LogText "$($ImportEvent.GetReport($true, 'Users'))"

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article