Category Archives: Excel

Office/Excel Tip: Add cell value to text string, including inverted commas

I have a spreadsheet with the Active Directory current_ObjectID attribute in column H and the new_ObjectID I want to apply in column J.

The powershell script to make the change I want is this:

Rename-ADObject –Identity “<current_objectGUID>” –NewName “<new_objectGUID>”

To autopopulate the current and new ObjectID values from their respective columns and keep the inverted commas around the ObjectID values I needed to type the following:

=”Rename-ADObject –Identity “””&H3&””” -NewName “””&J3&””””