In the last post we went through installing LAPS management tools, extending the AD schema and setting the delegation rights for computer OU to allow computer to write back to the LAPS password attribute.
The next step is to install the LAPS client this can be done either by using a script, group policy or SCCM.
I used the below the script to install remotely just need to create the complist with host name of devices and update the sharename and verions of LAPS that is required
$Computers = Get-Content “C:\Temp\complist.txt”
foreach ($Computer in $Computers){
Write-Warning “installing LAPS on $Computer”
$command = “msiexec /i C:\windows\temp\LAPS.x64.msi /quiet”
$Remotecmd = “CMD.EXE /c ” + $command
Copy-Item \\sharename\LAPS.x64.msi -Destination \\$Computer\c$\windows\temp\
Invoke-WmiMethod -class Win32_process -name Create -ArgumentList $Remotecmd -ComputerName $Computer | Out-Null
}
The second option is to deploy using GPO software install
Craete a new GPO > Policies > Software settings > software installtion > New packageAdd the installer
Next apply the policy agaist the OU or use security filtering to apply to specific devices once the policy is applied logon to the device and run gpupdate /force to apply
Third option is to use a tool like SCCM to package the application and deploy to devices. This would be my preferred way as its gives the best reporting.
We won’t go through the process but the command line install will msiexec /i C:\windows\temp\LAPS.x64.msi /quiet