Hi guys, I am trying to create a script to run a URL based on site code.
We are using a three digit AD site code ex: 001, 002, 003, etc...
What I am looking for a script that check in which AD site/Service the PC is at and the return three digit code which will be add to the end of url.

AD Site 001
URL http://www.test.com/ENT={site Code} http://www.test.com/ENT=001
Also because we are in a secure envoirement the script should be allowed to run by normal users other than only administrators.

I am new in scripting and looking forward to learn more.

Any help is highly appreciated [:D]
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


H Guys, as I am newbie I have now resolved the issue with admin rights, was just a case of (CASE SENSITIVE) word. I am now using the UCASE (.....) to avoid it in the future.
Answered 07/20/2009 by: roma70
Senior Yellow Belt

Please log in to comment
Thought that I have fixed the permissions problems, I am still in pain to found some script that will help me on my task. Any help???

If possible may run the script query to return the ad site code Active Directory Site and service or SCCM) may using WMI or whatever is most common, once found should check a list (TXTo csv) and search what the code belong to and add the code reference to the URL.

AD 001
Site code returned 001

Check compare/copy the name after the code(=) on TXT or CSV

CSV or TXT contain
once found the code in this case 001 will edit the URL ENT= meaning
I know that I am not really good in explaining things but if someone will come up with some initial idea I will start getting my head around and learn by fault/finding and with your guys help, [8D]

Thanks in advance,
Answered 07/21/2009 by: roma70
Senior Yellow Belt

Please log in to comment
Hi guys, for all those that have hit my request, I have finally found my solution.

Thank you,
Answered 07/24/2009 by: roma70
Senior Yellow Belt

Please log in to comment