This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Add AD Windows Group via PowerShell

So I'm trying to create a powershell script to add Active Directory Groups via SWIS PowerShell script.

This is where I've got to and it's failing on the ConvertFrom-Json;

$settings = Get-Content "$PSScriptRoot\Settings.json" -Raw | ConvertFrom-Json

$swis = Connect-Swis -Host "1.1.1.1" -UserName "AD_USER_ACCOUNT" -Password "MYPWD"

$ADGroup = Invoke-SwisVerb $swis Orion.Accounts.CreateWindowsAccount @($settings.accountType, $settings.userOrGroupName, $settings.adminUser, $settings.adminPassword)

{
"accountType" : "3",
"userOrGroupName" : "DOMAIN\ADUSER",
"adminUser" : "ADMINUSER",
"adminPassword" : ADMINPWD"
}

ConvertFrom-Json : Unrecognised escape sequence. (149): { ......

Can anybody help me please?

Parents Reply Children
No Data