cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
555
Views
5
Helpful
4
Replies

I face a problem with Python Scripting Host

Jakke2440
Level 1
Level 1

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

lindborg
Cisco Employee
Cisco Employee

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

Anthony Holloway
Cisco Employee
Cisco Employee
I had no idea this existed. Thanks for raising awareness...even if unintentionally.

You’re welcome 😉

lindborg
Cisco Employee
Cisco Employee

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. 

Thanks I will give that a try
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: