Solved

powershell Excel formula data resolving for powershell

Posted on 2014-09-17
2
114 Views
Last Modified: 2014-09-19
Dear friends,

the  problem in this formula is "&L151& $db"
ii've a special case to insert Text from a cell with result of variable to description. How could i write that?

="$db = (Get-Mailbox -Identity "&A151&" | Select-Object -expand Database);;set-aduser -identity "&A151&"  -description "&L151& $db"

L151 contents the text. the result should be  "text  DB001"
$DB is e.g. DB001

="$db = (Get-Mailbox -Identity "&A151&" | Select-Object -expand Database);;set-aduser -identity "&A151&"  -description "&L151& $db"

Open in new window


Thanks in advance
0
Comment
Question by:Mandy_
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
Mandy_ earned 0 total points
ID: 40334098
write first one value to description then get it again as variable  and write it with other variable

="$db = (Get-Mailbox -Identity "&A151&" | Select-Object -expand Database);set-aduser -identity "&A151&"  -description  "&M151&";$desccurrent = (Get-ADUser -identity "&A151&" -Properties Description).Description;set-aduser -identity "&A151&" -description ($desccurrent+' '+$db)")

Open in new window

0
 
LVL 2

Author Closing Comment

by:Mandy_
ID: 40334099
No comments afterlong time. resolve by myself.  write first one value to description then get it again as variable  and write it with other variable
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question