Keeping leading 0s in Azure Automation Powershell parameter

Context
Hi, I am trying to create folders in SharePoint with an Azure Automation Powershell script. The script accepts a Job Number, Project Number, and Job Name in order to create the root folder. The user that is going to be using this script wants to have the folder be named “Job Number - Project Number - Job Name”, and he wants the Job Number to be in the form of 001, 002, 003 etc.

Problem
Currently, when a number with leading 0s is passed into the Azure Automation script, the leading 0s all disappear. I’m not sure how to fix this behavior.

Current Implementation

Param(
    [string]$JobNumber,
    [string]$ProjectNumber,
    [string]$JobName,
    [string]$ListItemId
)

Write-Output $JobNumber; 
#Prints '3'

$jobUrl = "Shared Documents/General/01 - Projects/$($JobNumber) - $($ProjectNumber) - $($JobName)"; 
#Prints 'Shared Documents/General/01 - Project/3 - ##### - abcdefg

Azure Automation Inputs

Any help you can give on this is appreciated.

Thanks!

Justin,
welcome to the forums.
The easiest way to format a number with leading zeros is to use the format operator.

Param(
    [INT]$JobNumber,
    [INT]$ProjectNumber,
    [string]$JobName,
    [string]$ListItemId
)
$jobUrl = 'Shared Documents/General/01 - Projects/{0:d3} - {1:d3} - {2}' -f $JobNumber, $ProjectNumber, $JobName

$jobUrl