Run URL based on AD Site code

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   [ + ] Show comments

Answers (3)

Posted by: roma70 13 years ago
Senior Yellow Belt
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.
Posted by: roma70 13 years ago
Senior Yellow Belt
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,
Posted by: roma70 13 years ago
Senior Yellow Belt
Hi guys, for all those that have hit my request, I have finally found my solution.

Thank you,
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ