forked from gregnottageGHOrg/IntuneScripts
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNew-IntuneApp.ps1
40 lines (34 loc) · 1.35 KB
/
New-IntuneApp.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#
.COPYRIGHT
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
See LICENSE in the project root for license information.
#>
#Script to create a new IntuneWin package
Param(
[parameter(Mandatory = $true, HelpMessage = "Enter a name for the new package")]
$Name
)
$NewPackageName = "$PSScriptRoot\$Name"
$sourcePath = "$PSScriptRoot\CopyMeAsStartingPointForNewPackages"
Write-Host "Cloning ..."
Try {
Copy-Item -Path $sourcePath -Destination $NewPackageName -Recurse -Force -ErrorAction Stop
Rename-Item -Path "$NewPackageName\Source\Install-Template - only required if AppType is PS1.ps1" -NewName "$Name.ps1"
}
Catch {
Write-Warning "$($env:computername.ToUpper()) : $($_.Exception.message)"
Exit
}
write-host ''
write-host '-----------------------------------------------------------------------' -ForegroundColor cyan
write-host ' New package folder created' -ForegroundColor Yellow
write-host
write-host ' Next Steps:-'
write-host
Write-Host ' 1. Copy the package content into ' -nonewline
write-host $NewPackageName'\Source' -ForegroundColor green
Write-Host ' 2. Copy the logo png file into ' -nonewline
write-host $NewPackageName -ForegroundColor green
write-host " 3. Run .\Set-Config.ps1 -Name $Name"
write-host '-----------------------------------------------------------------------' -ForegroundColor cyan
write-host ''