[rt-users] Up-Load a list of Customers into RT as a Requestors

Marcelo Calado | TBS TAX Services mcalado at tbstaxservices.com
Fri Jan 8 11:16:41 EST 2016


Hi There!

 

I hope this helps someone.

 

In order to create new users(requestors) from my customer list, I decided
use the PowerShell Script. 

 

I've following the examples and built in accordance with the need of our
customers.

 

http://requesttracker.wikia.com/wiki/REST

 

 

$servername="https://myserver.com/REST/1.0/user/new?user=myuser&`pass=mypass
word"
$content = @'
id: user/new
Name: TestofCreated
EmailAddress: TestOfCreated at gmail.com
RealName: Test of Created
Organization: Test SMB
Address1: 44,Test Street 
City: New York
State: MA
Zip: 08032
Country: USA
MobilePhone: 508-999-9999
'@
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object
TrustAllCertsPolicy

$RT = Invoke-WebRequest -Uri $servername -Body @{content=$content} -Method
Post
$RT.content

 

Marcelo Calado.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160108/b1bb5ed4/attachment.htm>


More information about the rt-users mailing list