Solved

powershell Excel formula data resolving for powershell

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Set OWA language and time zone in Exchange for individuals, all users or per database.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

23 Experts available now in Live!

Get 1:1 Help Now