Liongard Ideas Portal

Submit and upvote ideas to make Liongard better. You get 20 votes so vote wisely. 🙂


The Product Team is constantly reading your ideas and while we can’t promise that all ideas will become a reality, we value your feedback and promise to always have our Partners in mind when building and improving Liongard.

Check out our FAQs to learn more.

See what we've shipped by clicking here!

Add "Local Group" Pre-Requisite into Least Privileges Script

As per the Least Privileges documentation, the Liongard service account requires to be a member of the "Hyper-V Administrators" and "Remote Management Users" local user groups for each server.

This should be added into the existing Liongard PowerShell script that handles the WMI/SC Manager permissions as saves considerable time.

I've added this functionality myself at the end of the current script and it works great.


Write-Host -BackgroundColor Blue -ForegroundColor Yellow "Adding Liongard Service Account to Local User Groups"

$GroupName = "Remote Management Users", "Hyper-V Administrators"

$DomainName = $env:USERDOMAIN

$ErrorActionPreference = "Stop"

foreach($server in $x) {

$Server = $Server.trim()

$ComputerName = $Server

Write-Host "Processing $ComputerName" -ForegroundColor Green

Foreach($localgroup in $groupname){

Try{

$Group = [ADSI]"WinNT://$ComputerName/$localgroup,group"

$User = [ADSI]"WinNT://$DomainName/$serviceuser,user"

$Group.Add($User.Path)

}

Catch{

$_.Exception.innerexception

Continue

}

}

}


  • Sam Walker
  • Mar 15 2022
  • Reviewed - Under Consideration
Last Reviewed Date 2022-07-01
  • Attach files