0

Is it possible to automate the installation of ADConnect?

Microsoft state on this page:

We are not planning to implement this functionality at this time.

but nothing is impossible. I will look to automate it and if I find a way, will post the results here. But has anyone had any luck trying?

Dicky Moore
  • 956
  • 3
  • 10
  • 32
  • I'd likely have to go with the official comments of `We are not planning to implement this functionality at this time` likely if there was something added it would have been updated to reflect. – Matthew Oct 22 '19 at 11:36
  • Thanks @Matthew. I agree that this shows that Microsoft have not provided any means of automation. However, that doesn't mean it can't be achieved by other means, such as direct editing of the registry and files. I'm wondering if anyone has tried this. – Dicky Moore Oct 22 '19 at 13:58
  • Does https://www.microsoft.com/en-us/download/details.aspx?id=47594 not work for you? – Christopher Painter Oct 22 '19 at 14:37

1 Answers1

0

As mentioned by @Matthew , "We are not planning to implement this functionality at this time." But As suggested , you can download the MSI and execute it from powershell to install Azure AD connect. I haven't tried installing AD connect it but something like below should work:

$file_path = "c:\test"

$log_path = "c:\test"

$machine_name = Invoke-Command -ScriptBlock {hostname}

$date = (Get-Date -format "yyyy-MM-dd")

$msi =@('C:\test\installer1.msi','C:\test\installer2.msi')

foreach ($msifile in $msi)

{

Start-Process -FilePath "$env:systemroot\system32\msiexec.exe" -ArgumentList "/i `"$msifile`" /n /passive /l:c:\temp\epson.driver.wrapper.log" -Wait -WorkingDirectory $CurrentLocation

Start-Sleep 300

}

Reference: https://community.spiceworks.com/topic/507906-powershell-to-install-exe-and-msi-package

How to install .MSI using PowerShell

Hope this helps, feel free to tag me in your conversation.

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27