Hi All,
I'm having an issue adding text to the comment attribute in AD using powershell for a computer object.
I have used the follwoing (from MS technet article) to update the 'description' field but cannot use the same process for the 'comment' field.
"Import-Module ActiveDirectory
Import-CSV "D:\Dump\Scripts\CTest.csv" | ForEach-Object {
$Computer = $_.ComputerName
$Comm = $_.Comment
Set-ADComputer $Computer -comment $Comm }
obviously I changed the fields over from the MS example ($_.description & -description $desc)
even if I try and simply run the command from powershell it doesn't work...
(WORKS)
set-adcomputer COMPUTERNAME -description DESCRIPTION_TEXT
(DOESN'T WORK)
set-adcomputer COMPUTERNAME -comment COMMENT_TEXT
Error = Set-ADComputer : A parameter cannot be found that matches parameter name 'comment'.
BUT this will pull back the current comment - I inputted some test text through AD Users n Computers
Get-ADComputer COMPUTERNAME -properties comment
Any ideas would be greatly recieved - have 2000 to update and doing via CSV is going to be MUCH easier.
Cheers