I am really interested in this module, mostly about the part which would let me upload multiple apps at the same time for new intune customers.
However, I can't get "Add-ISKApps" working. I've tried it from 2 different machines and 2 different tenants (where I am Global Admin) with the same result.
First I "connect-isk" and I am connected to graph.
I have previously used PSAppDeployToolkit, but I created new intunewins for all my test win32 apps, using install.ps1 instead of the .exe when specifying setup file.
I am somewhat confused by these repository instructions, but I've tried to include the install/uninstall.ps1 in the folder and also not with the same result.
If I understand it correct, the intunewin should include install.ps1/uninstall.ps1 and the repository folder should include the intunewin, check.ps1 and optionally and .png.(I will show tests without .png to decrease log size)
I've created a check.ps1 which I guess will be used as a custom detection method.
Check.ps1
$Path = Get-Content "C:\Program Files\7-Zip\"
if (Test-Path $Path) {
Write-Output "Software is installed"
exit 0
}
else {
Write-Output "Software have not been installed"
exit 1
}
Now when I run the command to add apps I get the following error log. What I notice is that the .intunewin file in the log is named IntunePackage.intunewin instead of "7zip.intunewin" as I named it. I notice I get 2 warnings, but not how I would solve them.
PS C:\Users\MYUSERNAME> Add-ISKApps -Path "C:\AppDeployTest"
WARNING: Request to https://graph.microsoft.com/Beta/deviceAppManagement/mobileApps failed with HTTP Status
Forbidden and description: Forbidden
WARNING: Failed to create Win32 app using constructed body. Passing converted body as JSON to output.
WARNING: {
"@odata.type": "#microsoft.graph.win32LobApp",
"applicableArchitectures": "x64",
"description": "7zip",
"developer": "",
"displayVersion": "",
"owner": "",
"notes": "",
"informationUrl": "",
"privacyInformationUrl": "",
"isFeatured": false,
"displayName": "7zip",
"fileName": "IntunePackage.intunewin",
"setupFilePath": "install.ps1",
"installCommandLine": "powershell.exe -ExecutionPolicy Bypass -File .\\install.ps1",
"uninstallCommandLine": "powershell.exe -ExecutionPolicy Bypass -File .\\uninstall.ps1",
"installExperience": {
"deviceRestartBehavior": "suppress",
"runAsAccount": "system"
},
"minimumSupportedWindowsRelease": "2004",
"msiInformation": null,
"publisher": "scloud.work",
"runAs32bit": false,
"detectionRules": [
{
"@odata.type": "#microsoft.graph.win32LobAppPowerShellScriptDetection",
"enforceSignatureCheck": false,
"runAs32Bit": false,
"scriptContent":
"JFBhdGggPSBHZXQtQ29udGVudCAiQzpcUHJvZ3JhbSBGaWxlc1w3LVppcFwiDQoNCmlmIChUZXN0LVBhdGggJFBhdGgpIHsNCiAgICBXcml0
ZS1PdXRwdXQgIlNvZnR3YXJlIGlzIGluc3RhbGxlZCINCiAgICBleGl0IDANCn0NCmVsc2Ugew0KICAgIFdyaXRlLU91dHB1dCAiU29mdHdhc
mUgaGF2ZSBub3QgYmVlbiBpbnN0YWxsZWQiDQogICAgZXhpdCAxDQp9"
}
],
"returnCodes": [
{
"returnCode": 0,
"type": "success"
},
{
"returnCode": 1707,
"type": "success"
},
{
"returnCode": 3010,
"type": "softReboot"
},
{
"returnCode": 1641,
"type": "hardReboot"
},
{
"returnCode": 1618,
"type": "retry"
}
]
}
Apps imported:
7zip
Chrome
OpenVPN