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.
Example;
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]
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.
Example;
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)
Please log in to answer
Posted by:
roma70
15 years ago
Posted by:
roma70
15 years ago
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.
EX:
AD 001
Site code returned 001
Check compare/copy the name after the code(=) on TXT or CSV
CSV or TXT contain
001=a
002=b
003=c
004=d
etc...
once found the code in this case 001 will edit the URL ENT= meaning
http://www.test.com/ENT=a.
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,
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.
EX:
AD 001
Site code returned 001
Check compare/copy the name after the code(=) on TXT or CSV
CSV or TXT contain
001=a
002=b
003=c
004=d
etc...
once found the code in this case 001 will edit the URL ENT= meaning
http://www.test.com/ENT=a.
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
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.