I keep trying to set this up with PSADT, after seeing some of the weird ways that others install the client using scheduled tasks and setting up a cloud gateway. I am hoping to just be able to package it up in Intune and avoid going that route, but I am having no luck. Even when I attempt to run an install, it doesn’t even seem to pop up with an error for me to start digging into, so I am hoping this is something that has been done by one of the smarter people here.
I don’t believe I even need the /mp in there, but I’ve tried it each way with no difference. I 've stripped the arguments down and can’t seem to find which one might be causing issues. When I check the log, it simply just give me this, which doesn’t seem to scream at any particular argument:
Commencing invocation of C:\Users\username\Desktop\Intune Packages - In Progress\Configuration Manager Client\Old Client\Invoke-AppDeployToolkit.ps1.
Administrator rights are required. The verb 'RunAs' will be used with the invocation.
No '-File' parameter specified on command-line. Adding parameter '-File "C:\Users\username\Desktop\Intune Packages - In Progress\Configuration Manager Client\Old Client\Invoke-AppDeployToolkit.ps1"'...
Executable Path: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe
Arguments: -ExecutionPolicy Bypass -NonInteractive -NoProfile -NoLogo -WindowStyle Hidden -File "C:\Users\username\Desktop\Intune Packages - In Progress\Configuration Manager Client\Old Client\Invoke-AppDeployToolkit.ps1"
Working Directory: C:\Users\username\Desktop\Intune Packages - In Progress\Configuration Manager Client\Old Client\
Exit Code: 0
I have a feeling it might be a quirk of how PowerShell recognises the / character…
The // you have in the url could be causing this, I have a hunch the / is being recognised as an escape character, so I suspect you may need to try the URL as "/mp:`"https:////servername.domain.com`" or possibly "/mp:`"https:`/``/`servername.domain.com`"
I’ve seen some examples online of where you set the path to a local file as "FILE:////C:\pathtofile\file.ext" probably for the same reason
or alternatively put it in single quotes as it does not contain a variable so you don’t need it expanded "/mp:'https://servername.domain.com' ...
I’d recommend '/mp:"https://servername.domain.com" ...' instead as command line apps don’t really recognise single quotes, and because there’s no variable expansion going on here, single quotes would be best.
Don’t install the agent like this and don’t have Intune yet.
My experience is that you have to use tricks to assemble it; the standard PowerShell syntax no longer works in version 4.x.
I tried the most recent one with the "$($adtSession.DirFiles)" suggestion, since it doesn’t seem like it would make to big of a difference. However, that one never installed correctly, so I went back to your suggestion of:
I am now seeing the services install and the green light is on in SCCM, so I think we are all good! The only strange thing I see is that once the installer was finished and I could see services created, it popped up with this:
Not sure if that will actually pop up when I set up to deploy in Intune, from what I can tell, it is the built in Windows service called “Program Compatibility Assistant”. I tried running
Stop-ADTServiceAndDependencies -Name ‘PcaSvc’
And it seems like there was recently a bug with this, and I think that bug is still around because I get the same $Service “has not been set” error that others were experiencing as well.
Can you please try with a development version? This issue has been fixed for some time, however all effort is onto 4.1.0, which we’re aiming to release this quarter.
I actually tried with the newest version that I could find on Github and had the same result. Is there a link to a dev version that I am not seeing out there?