#210231 - 2015-05-04 11:03 PM
Basic Scripting
|
kevinj895
Just in Town
Registered: 2015-05-04
Posts: 4
Loc: Ohio, USA
|
I just started a new job about a month ago, and the company uses this script. As of now, they use it to map network drives and network printers. They assigned me to look into this script and see what else it can do. I've been researching online and noticing there are vast examples of what you can do with this script. However, none of them seem to be practical. Like some are for games, doing small things here and there. I was wondering if you guys could share with some practical examples of how you use the script or seen others use the script. Can you make it so when you login the computer checks for Windows updates or things of that nature? Please let me know! Thanks!
|
Top
|
|
|
|
#210232 - 2015-05-04 11:18 PM
Re: Basic Scripting
[Re: kevinj895]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4545
Loc: USA
|
If you are only using Kix for login processing your options are limited to the rights of the user. However, admin scripts are very powerful and can do just about anything. I suggest your start in the manual and then the User Defined Functions (UDFs) and look at all the amazing functions that have already been done for you.
All the UDFs are here - http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1
How to use UDFs - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943
If you are new to scripting, and/or have ever used vbscript, you will find kixtart very familiar and easy to learn. Powershell (as an alternative), while very powerful, is not very forgiving, and, in my opinion, ugly to read and write.
The best thing to do is ask yourself what you want to automate, and see what is available.
|
Top
|
|
|
|
#210235 - 2015-05-05 06:37 PM
Re: Basic Scripting
[Re: Allen]
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
Games? Games are practical (in their special time and place)!! Welcome to KORG, BTW - If we can't give you ideas for automation, nobody can!
I'm currently developing an automated NOC, with most of the autonomous features written in Kix, and all of the daily system maintenance tasks are now Kix-based, including:- Sequencing tasks and scheduling day/night task groups
- Validating antivirus is installed, running, and definitions are current
- Clearing all temp folders of stale files
- Backing up user files (shortcuts, favorites, templates, etc) for ALL users
- Check the Run and RunOnce keys for unwanted items, removing or reporting their presence
- Verify workstation time is sync'd with the DC, or PDCe is sync'd with global NTP
- Collect about 150 computer settings and values for query by the monitoring system
- Intelligent disk space monitoring, with alarms keyed to a ratio of disk size. Trending of usage is also performed to predict when a disk will cross the alarm threshold so that cleanup or disk management can be performed, or new storage can be provisioned.
- Disk defragmenter - auto skip SSD drives
- Disk Health Check - runs ChkDsk and performs a SMART query, reporting any errors found.
The Kix scripts allow local tracking of events, triggering an alarm only after 3 consecutive fault conditions for certain tests, eliminating alarms for temporary transitions (AV definitions outdated or disk capacity at threshold). This allows intelligent monitoring with the least amount of alarms being generated.
In a recent project where we consolidated 4 worldwide domains of about 15 to 25 thousand objects each, I used Kix to query each domain, then compare the results to identify accounts that were already in both domains; pull data from a specific site's OU, format it into Excel, and provide the worksheet to the Site Engineer to verify the information was correct. Once any corrections were made to AD, we'd re-run the report and use the resulting data to create migration-day tracking reports as well as a feed to the Quest tool to pick the accounts to migrate each day.
In a couple of companies, I've used Kix to automate the deployment of software, applications, and web apps.- SWDIST - a package of Kix scripts that can deploy any application, patch, or service pack to one or thousands of computers at multiple sites. This was deployed at the FED, serving 5 regional data centers, and at a large travel agency serving 2 data centers and over 450 branch locations. Kix scripts did the deployment, synchronized the deployment servers, managed logging, scheduling, and reporting.
- At the travel agency, a set of Kix scripts was used to deploy web application updates. The same tool allowed the DEV team to deploy to the DEV servers and validate the package. The Operations team then used the tool to deploy to QA, and after certification, to the PROD servers. Of particular note was the fact that the developers and operations team did not have permission to actually log onto the web servers in any environment - the deploy GUI communicated with a server that verified the user credentials and performed the update by proxy to the target web platforms. A complete rollback capability was also implemented, all in KiXtart.
- In a role as a Dev-Ops manager, I created Kix scripts to automate the deployment of multiple applications to various targets. The tool allowed the Operations staff to perform the installations without knowledge of the application or the installation process. All they needed to do was download the package and run the installer. Same installer for all apps, yet each app required a different process. Kix again was used for 99% of the code, with a few front-end BAT files to kick off the Kix process.
One of the reasons that Kix is so versatile (IMHO) is that it offers many admin-level features built-in, such as the ability to read, enumerate, and write the registry, read/write INI files, and has a wealth of pre-built add-on functions (UDFs). I have a fairly extensive UDF Library on my web site with about 180 UDF files and over 200 actual UDFs. The KGen utility (free download from my site) lets you use this library as if it were part of the core Kix package, automatically identifying and loading any required UDF into a finished script project. It also performs a "sanity check" to look for undeclared or duplicate declared vars, mismatched objects or command pairs, and other general syntax issues.
Of course, I also have a login script written in Kix, available for commercial use. Code free, has a GUI management tool, and it's FAST (usually completing even the most complex configurations in under 7 seconds).
Any questions - just ask, and we'll be happy to provide ideas and suggestions! (and don't forget to check out the Script Vault - click the Forums link above and scroll to the bottom of the page.)
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#210252 - 2015-05-11 10:05 PM
Re: Basic Scripting
[Re: Mart]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#210258 - 2015-05-12 04:01 PM
Re: Basic Scripting
[Re: Jochen]
|
Anonymous
Anonymous
Unregistered
|
What I think I wanted to boil it down to actually is see if I can have the script check for Windows updates on logging into Windows, and also check to see if the script could also remove network printers. Printers that aren't actually on the network that aren't used anymore. I appreciate all the replies back, I've been so busy trying to read it all and go through all the UDFs and what not.
|
Top
|
|
|
|
#210259 - 2015-05-12 04:02 PM
Re: Basic Scripting
[Re: Anonymous]
|
Anonymous
Anonymous
Unregistered
|
And my profile is acting fuzzy, guess it just posted as anonymous, but I'm replying as kevinj895 lol
|
Top
|
|
|
|
#210268 - 2015-05-15 05:29 PM
Re: Basic Scripting
[Re: Mart]
|
kevinj895
Just in Town
Registered: 2015-05-04
Posts: 4
Loc: Ohio, USA
|
Glenn - Trying to download your WUS toolkit and I keep getting a lot of the "500 - Internal server error."
Mart - Thanks, I'll look into that script and see what I can use. The company right now that handles our script said something like that could not be done so we obviously wanted to explore and see if it could. Thanks.
|
Top
|
|
|
|
#210279 - 2015-05-20 02:42 PM
Re: Basic Scripting
[Re: Mart]
|
kevinj895
Just in Town
Registered: 2015-05-04
Posts: 4
Loc: Ohio, USA
|
Download links still do not work just an FYI.
|
Top
|
|
|
|
#210301 - 2015-05-28 03:06 PM
Re: Basic Scripting
[Re: kevinj895]
|
kevinj895
Just in Town
Registered: 2015-05-04
Posts: 4
Loc: Ohio, USA
|
Glenn,
Is there any way you could provide me with your script(s) that check for Windows updates? Thanks
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 557 anonymous users online.
|
|
|