I am trying to create a few AD groups with PowerShell and I can't seem to escape special characters. One group I am trying to create -==My Group
Any help would be appreciated
That's... an odd name.
The backtick is PowerShell's escape character; you wouldn't use a backslash. But that's only PowerShell; there may be additional checking in the code of that command which is causing the rejection. PowerShell wouldn't normally need you to escape – or =, so it's AD most likely causing the error.
But backslashes are definitely not allowed. So they may be your problem source.
I am replacing an old Small Business Server 2011 that is bad shape. I was using PowerShell to get the ADgroup listing and recreate them on the new server. I am not going to worry about creating the exact groups. Just going to replace them with something more sane.
There's an IBM post that says = isn't allowed in user, group and computer names
The standard AD escape character \ doesn't work with = nor does the trick of using the ASCII code
Given the form of a distinguished name
I could understand = not being allowed
states that = NOT allowed in AD names.
AD administrative center just fails with a = in the name
AD Users and Computers says that nay of these
/\:;|=,+*?" are illegal characters for the pre-Windows 2000 group name and will be replaced by a underscore _
My opinion at the moment is that you're not going to be able to create groups with = in the name
You must be logged in to reply to this topic.