Solved

powershell Excel formula data resolving for powershell

Posted on 2014-09-17
2
113 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

My experience with Windows 10 over a one year period and suggestions for smooth operation
This article will help you understand what HashTables are and how to use them in PowerShell.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now