I have ImmyBot agent running on the DC but I don’t see what I need to do to get AD users to populate into immy? I also want to take advantage of the domain join but that doesn’t do anything either, the rename works fine but I’m not seeing anything fail in the logs regarding the domain join.
I made my own, tested and working. I wasn’t trying to get users into Immy, just wanted to do domain join.
param($Computer)
if(!$Computer)
{
$Computer = Get-ImmyComputer
}
$Computer | Invoke-ImmyCommand {
$domain = “domain goes here”
$username = “domain\user goes here”
$password = “Password goes here”
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($username, $securePassword)
Add-Computer -DomainName $domain -Credential $credential -Force -Restart
# Ensure compliance output
$compliance = $true # or $false based on your compliance logic
if ($null -eq $compliance) {
Write-Output "The Test script did not return any output. Please ensure you output at least one `$true or `$false value to indicate compliance."
} else {
Write-Output $compliance
}
}