Hi guys!
I've just started learning Powershell and I'm really newbie at it! so sorry for that
but i have a big problem! this is my scenario:
I've created a text file that contains some first names and last names that has been separated by space like this:
Jack Nicholson
Tom Cruise
.
.
I want to create an object with this in order to add multiple users in A.D
I used these commands:
$array = get-content name.txt | foreach (
>>$name = @{}
>>$name.first , $name.last = $_.Split()
>>$name
>> )
But i received this error:
Missing closing ')' in expression.
At line:3 char:1
+ <<<< $name.first , $name.last = $_.Split()
+ CategoryInfo : ParserError: (CloseParenToken:TokenId) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
can you help me please? what's the problem ? what should i do?
I've just started learning Powershell and I'm really newbie at it! so sorry for that
but i have a big problem! this is my scenario:
I've created a text file that contains some first names and last names that has been separated by space like this:
Jack Nicholson
Tom Cruise
.
.
I want to create an object with this in order to add multiple users in A.D
I used these commands:
$array = get-content name.txt | foreach (
>>$name = @{}
>>$name.first , $name.last = $_.Split()
>>$name
>> )
But i received this error:
Missing closing ')' in expression.
At line:3 char:1
+ <<<< $name.first , $name.last = $_.Split()
+ CategoryInfo : ParserError: (CloseParenToken:TokenId) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
can you help me please? what's the problem ? what should i do?