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.
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.
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.