cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
181
Views
5
Helpful
4
Replies
Highlighted
Beginner

I face a problem with Python Scripting Host

Hello @lindborg I just learned about PSH for Unity.  This was just what I was looking for.

I wanted to automatically delete user when they are remove from AD. So I watched your video's and I could get my script to retrieve the to be deleted user.

But the I wanted to schedule the script and I get a error the moment I click on Options/schedule scripts to run/Schedule Script

I get an error : Index was outside the bound of the array.

My PC is running windows 10 (1809) and I attached the details in the window, I hope you can help me.

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: I face a problem with Python Scripting Host

hmmm... just fired up PSH on my Windows 10 dev box and scheduled a task no problem - unfortunately the Windows task scheduler API has changed 3 or 4 times along the way and keeping the DLLs for client side access up to date is a pain - one of the reasons I've stopped adding scheduling assistance from within applications of late.

But the good news is that's just a convenience thing, you can set this up yourself no problem.

1. Open the Windows Task Scheduler (just hit the windows start and type "Scheduler" it'll come right up).

2. Create a new task

3. Setup whatever name, login rules and trigger setup you like.

4. On the "Action tab" select new and choose "start a program"

5. Browse to the PSH exe from wherever you installed it.

5. add an argument string that looks like this:

/Silent=[ucbu-aricent-vm75.cisco.com] /Script=[D:\XPDev\PythonScriptingHost\PythonScripts\CreateCallHandlersForLoadTesting.py]

6. In the "start in folder" put the folder name of where PSH is installed (i.e. D:\XPDev\PythonScriptingHost from above example)

 

that's it - you're good to go.  As long as you've logged into the server name in the "/Silent" parameter at least once it'll have the PW stored and can log in and run on command. 

View solution in original post

4 REPLIES 4
Highlighted
VIP Mentor

Re: I face a problem with Python Scripting Host

I had no idea this existed. Thanks for raising awareness...even if unintentionally.

Anthony Holloway
Highlighted
Beginner

Re: I face a problem with Python Scripting Host

You’re welcome 😉
Highlighted
Cisco Employee

Re: I face a problem with Python Scripting Host

hmmm... just fired up PSH on my Windows 10 dev box and scheduled a task no problem - unfortunately the Windows task scheduler API has changed 3 or 4 times along the way and keeping the DLLs for client side access up to date is a pain - one of the reasons I've stopped adding scheduling assistance from within applications of late.

But the good news is that's just a convenience thing, you can set this up yourself no problem.

1. Open the Windows Task Scheduler (just hit the windows start and type "Scheduler" it'll come right up).

2. Create a new task

3. Setup whatever name, login rules and trigger setup you like.

4. On the "Action tab" select new and choose "start a program"

5. Browse to the PSH exe from wherever you installed it.

5. add an argument string that looks like this:

/Silent=[ucbu-aricent-vm75.cisco.com] /Script=[D:\XPDev\PythonScriptingHost\PythonScripts\CreateCallHandlersForLoadTesting.py]

6. In the "start in folder" put the folder name of where PSH is installed (i.e. D:\XPDev\PythonScriptingHost from above example)

 

that's it - you're good to go.  As long as you've logged into the server name in the "/Silent" parameter at least once it'll have the PW stored and can log in and run on command. 

View solution in original post

Highlighted
Beginner

Re: I face a problem with Python Scripting Host

Thanks I will give that a try
CreatePlease to create content
Content for Community-Ad
Future of Work Virtual Summit Day 5

Cisco COVID-19 Survey