Powershell script
  
February 20th, 2014 5:01pm

Hi,

It's hard to help you if you don't post your script.

Free Windows Admin Tool Kit Click here and download it now
February 20th, 2014 5:58pm

More like this guy is just trying to be a wise guy.

There is no question.  This appears to be just random unreadable postings.

Any technician would knowenough to post a custom file like this to the vendor forum first.  This is a PFF file which is proprietary to Sapien and it is a third party script produced by a Sapien partner to add users.  It has been altered.

The OP should either post in vendor forum or post a link to the PFF file.

The script should be reduced the least amount of code necessary to demonstrate the problem.  In the process of doing thisit is likely that the issue will be discovered.

February 21st, 2014 7:44am

New-ADUser : The object name has bad syntax

at C:\Scripts\NewuserG1.ps1:365 char:13

+            New-ADUser <<<< @User -ErrorVarible ADError

+            CategoryInfo              : NotSpecified: (CN=Robert Bard,...3user.local:String)  [New-ADuser], ADException

+ FullyQualifiedErrorID : The object name has bad syntax, Microsoft.ActiveDirectory.Management.Commands.NewADUser

  

This error message is pretty explicit if you read it carefully.  The items provided to the splat are not correct for the CmdLet around the item that is noted: NotSpecified: (CN=Robert Bard,...3user.local:String) 

This format is not correct.

I recommend either placing trace statements or running under debugger.  The modified code has broken the original form format and design.  GO back andlook at how you altered the logic for building this "splat".

I know that it is likely that you have little or no PowerShell experience which is what has led to dumping all of this here. Unfortunately we cannot debug a 1200+ line script for you.  You will have to step through this with a debugger or remember what you changed that could have caused this.

Free Windows Admin Tool Kit Click here and download it now
February 21st, 2014 8:08am

The problem is in your XML changes.  You have broken the syntax by not using a legal distinguishedname.

See:

   <Path>OU=Users 100MB Mailbox,OU=Users,OU=Cop,OU=DK,OU=Nordic,DC=internal,DC=local</Path>

That is what a path should look like.  Look at yours.

February 21st, 2014 8:50am

Please read:

How to Write a Bad Forum Post

In particular, items 6 and 7.

Bill

Free Windows Admin Tool Kit Click here and download it now
February 21st, 2014 11:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics