Skip to content

Convert JSonToOMACSVTemplate.ps1 usage

Weatherlights edited this page Mar 28, 2024 · 2 revisions

This script can be used to capture a json configuration to an Intune ADMX backed profile. The output can be uploaded using the Invoke-CSVToIntuneUpload.ps1 script.

Parameter

Name Datatype Description Sample
FilePath string Specify the path to the file you want to capture. c:\users\myuser\appdata\roaming\code\user\settings.json
PathOnTargetSystem string This is the path to the file on the target system. You may use envoirenment variables here in the way you use them in the cmd (So with a %-sign the beginning and at the end). %APPDATA%\Code\User\settings.json
AppName string This is the name of your app. This is used in the backend to generate the OMA-URIs and names in Intune. With AppPolicyName together this value should be unique. Visual Studio Code
AppPolicyName string This is the name of your your policy (so for example the file you capture). This is used in the backend to generate the OMA-URIs and names in Intune. With AppName together this value should be unique. Custom settings.json
Context User or Machine This specified in which context the configuration gets applied. Use user to make the configuration user dependent and system for system wide configuration. User
Operation Create, Update, Replace (Default), Delete This is the default operation of your created configuration. You should use replace here for policy like configuratins (That get enforced) or create for recommended configurations. Replace
OutputFilePath String This is where the Intune configuration profile gets saved as a csv file. You can upload this file to Intune using the Invoke-CSVToIntuneUpload.ps1 script. c:\PolicyApplicator\visualstudiocodeprofile.csv