Monday, August 1, 2011

Home /Active Directory /PowerShell /script / Udpate Comptuer Description–PowerShell Script

Udpate Comptuer Description–PowerShell Script

Purpose - To update the computer description (description attribute) in Active Directory. – PowerShell V2 Script. 

Input File – Input file (Computers.csv) contains Computer Name and Description. 

image

Script:

image


I have also uploaded this script to Microsoft TechNet Gallery - http://gallery.technet.microsoft.com/scriptcenter/6e883230-fa47-4a9e-aa92-446ab3bea6dd


More scripts - http://portal.sivarajan.com/search?q=script+powershell&max-results=20

SS

Santhosh Sivarajan

Microsoft MVP · Identity & Cybersecurity Architect

Santhosh has 30+ years of hands-on enterprise experience in Identity and Access Management, Microsoft Entra ID, Active Directory, Microsoft 365 and Zero Trust architecture. He is the author of two books on Windows Server and security, and leads consulting, assessments and training at SAG Business Group.

11 comments:

Thank you very much Santhosh!

Just cant seem to sort my network Certificates & Permissions...Help pls

getting below error
--Set-ADComputer : Cannot validate argument on parameter 'Identity'. The
argument is null. Provide a valid value for the argument, and then try running
the command again.
At line:1 char:16
+ Set-ADComputer $Computer -Description $Desc
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Set-ADComputer], ParameterBind
ingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Activ
eDirectory.Management.Commands.SetADComputer

im getting the following error:

Set-ADComputer : Insufficient access rights to perform the operation
At D:\Tools\CheckComputerDescription\CompDesc3.ps1:5 char:1
+ Set-ADComputer $Computer -Description $Desc
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (USCHEZWIMO2071:ADComputer) [Set-ADComputer], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:8344,Microsoft.ActiveDirectory.Management.Commands.SetADComputer

Thanks Sir,
Perfectly working

Insufficient access rights to perform the operation
do you know why I would see this error?
it worked the first time..

CN=Active Directory ARS
Set-ADComputer : Insufficient access rights to perform the operation
At C:\FTR\NewComputerFromCSV.ps1:14 char:1
+ Set-ADComputer $Computer -Description $Desc
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

did you figure out why you received this message?

Thanks for posting the best information and the blog is very helpful.

Python Training in Bangalore | Python Online Training

This PowerShell script is a neat way to update Active Directory computer descriptions. Think of it like leveling up your IT skills! It takes a CSV with computer names and descriptions, automatically applying those changes. If you're looking for a quick break after scripting, explore some fun io games online. They're a simple, engaging way to unwind before tackling the next task, like optimizing your network infrastructure!

Post a Comment

Popular Posts
Workstation Trust Relationship Issue Issue: You receive the following error message, when you try to login to the domain.  The security database on the server does not have ... ADMT Service Account - Permission and Configuration The ADMT service account needs to have proper permission in source and target domains.  You don’t need to use 2 separate accounts.  You can ... My First Peek into Microsoft Exchange 2010 By Santhosh Sivarajan Before I really dive into Exchange 2010, I thought I would install and play with it first. I took some screen shots and notes during the ins... ObjectSID and Active Directory What is an objectSID in Active Directory? When a new object is created in Active Directory, Domain Controller assigns a unique value used ... AD Group Report - List Group Members in Active Directory–PowerShell Script Updated Script - http://portal.sivarajan.com/2011/10/search-ad-collect-local-admin-group.html Script #1 This script... Add Users to a Group–PowerShell Script Purpose – Add users to a group from an input file – PowerShell V2 Script.  Input file – Input file (Users.csv) contains samAccountName in... User Account Migration and Merging – Part I (ADMT) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM pre-creating user account ... User Account Migration and Merging – Part II (Quest Migration Manager) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM Pre-creating user account in... Delete Stale or Inactive Computer Accounts from Active Directory Here is an easy way to identify and delete inactive or stale computers in an Active Directory environment.  Using the dsquery command you c... Converting PowerShell (PS1) to EXE / Standalone Application As we know, there many applications available to convert a PowerShell file to a standalone executable file.  Based on my experience, PowerSh...