Lesson 1, Topic 5
In Progress

Install Microsoft’s Content Prep Tool

John Kraczek October 28, 2024
Lesson Progress
0% Complete

We are making excellent progress toward our goal of adding packages to Microsoft Intune. The last thing to install is Microsoft’s Content Prep tool. This application takes our setup files and PowerShell scripts then compresses and encrypts the files into a single intunewin file that we can upload to Microsoft Intune. 

You will find the GitHub repo for the content prep tool here. 

Download the latest release as a .zip and then unzip the file.

I like to put this executable into someplace that will be available on my profile. And then create an alias for it so that I can use the much shorter intwin command on the terminal.

Below is a simple script that will add a hidden folder .bin to your user profile and then open the folder in Explorer so that you can copy the Content Prep Tool there. If you would rather just invoke the content prep tool with a full path to the executable you can put the full path to the tool into the pack.ps1 file you added earlier. 

makeProfileBin.ps1
.ps1
				
					
# Define the folder path you want to add
$profileBin = "$($env:UserProfile)\.bin"
# Exmaple: "C:\Users\<username>\.bin"


# Check if the folder exists
if (-not (Test-Path -Path $profileBin)) {
    # Create the folder if it does not exist
    New-Item -ItemType Directory -Path $profileBin -Force
    Write-Host "Folder '$profileBin' created."
} else {
    Write-Host "Folder '$profileBin' already exists."
}

# Get the path to the PowerShell profile
$profileContent = Get-Content -Path $profile
$aliasCommand = "Set-Alias -Name intwin -Value `"$profileBin\IntuneWinAppUtil.exe`""

# Check if the alias command already exists in the profile, if not add it.
if ($profileContent -notcontains $aliasCommand) {
    Add-Content -Path $profile -Value $aliasCommand
    Write-Host "Alias added to the profile."
} else {
    Write-Host "Alias already exists in the profile."
}

# Open the folder in File Explorer
write-host "Opening folder '$profileBin'..."
write-host "Copy the IntuneWinAppUtil.exe to this folder."

Invoke-Item $profileBin
				
			

Now you should be able to copy the IntuneWinAppUtil.exe to the folder that just opened, and invoke the intwin program by running:

PowerShell
				
					intwin -h
				
			

This should display the help information for the content prep tool. 

0 0 votes
Rating
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x