how to create new user in MSSQL on Windows 2008 R2 node using powershell script.

I have installed a puppet master on Centos 5.6, the agent on windows 2008 R2, I have also installed MSSQL on windows 2008, I want to create a new user in MSSQL using powershell script, which is not getting created, please help I have written the following script for creating a new user:-
the following script was written which was not giving any error:-
param (
[String]$servername,
[String]$loginname,
[String]$LoginType,
[String]$Password
)

1 Answer

You may want to be sure you are on the latest version of the powershell provider. Earlier versions had a bug which prevented them running in a 64bit space. If you find this works outside of Puppet but fails inside Puppet runs, it is likely that issue.