Change AD Description for a Remote Computer
Hey,
A simple tool I use to modify(replace) the AD Description of a Remote Computer, and then triggers a Scan for AD Infos right after.
$description = Read-Host 'Entrez la description voulue '
Set-ADComputer $(Computer:TARGET) -replace:@{"description"="$($description)"}
Invoke-Command -ScriptBlock {pdqinventory ScanComputers -Computers "$(Computer:TARGET)" -ScanProfile "AD Infos"}
Screenshots :
1
Comments
HELP .. does not work in my console
Hey, sorry i'm not a Powershell expert with knowledge about why. I'm running Set-ADComputer on my Windows 10 Computer with Powershell 5.1. I think it's native on it. Try to "Import-Module ActiveDirectory"
And tool is running Locally, not remotely. Your admin computer run the command, not the remote computer. To be clear about that :)
No PS expert here too.
Any help, PS experts?
Seems to be linked to your RSAT. Module is ready to use when RSAT are installed in windows 8, 8.1 & 10.
https://4sysops.com/wiki/how-to-install-the-powershell-active-directory-module/
If not Windows 8 or 10 :
Now a bit better .. but not working
I remember having already had this error, sometimes, and I don't know the cause.
For my part, it never happens twice in a row, it just work properly if I run it a second time.
Maybe a PDQ issue, try the script in Powershell ISE (adapt variables) to test if it works...
Maybe just need an additionnal reboot, an additionnal pre-requisite or something like that.. I think I can't help you more about that. :/