|
Re: Add User to AD Group Thomas M. wrote:
> I'm new to PowerShell and I'm trying to create a script that will add a user
> to an Active Directory group. I copied the following code out of a book
> into PrimalScript 4.1 Enterprise and modified it for my environment. I've
> sanitized the code (force of habit when posting on the Internet).
>
> <Path>\AddUserToGroup.vbs(3, 1) (null): There is no such object on the
> server.
> Exit code: 0 , 0000h
>
> where <Path> is the full path to the script file.
>
> Can someone show me what I am doing wrong?
I'm sorry, everything you mention is pointing to VBScript (including the
.vbs extension of the file you're running).
You're looking to make your existing VBScript run or want some help
porting it to PowerShell.
PowerShell's 'scripting engine' is very different from VBScript, and
PowerShell scripts are normally saved with a .ps1 extension.
Marco |