Git Product home page Git Product logo

powershell_kms_activator's Introduction

Powershell KMS Activator

I needed a script to ensure that Windows and Office installations on staff laptops would stay activated as staff transitioned to remote work because of COVID-19.

Usually staff would be on-site and would be working on desktop computers permanently connected to the university's network.

My university uses the Cisco AnyConnect Secure Mobility Client for VPN access.

I am sure that this script can be modified to be used with other VPN clients.

Follow the instructions below to setup this script:

  1. Download the script here and modify the $km_server variable under the # VARIABLES header to your KMS. See image below for reference.

  1. Open the Windows Task Scheduler.

  2. Go to Action > Create Task

  3. Under the General tab Change User or Group to SYSTEM (if appropriate).

    1. Ensure that Run with highest privileges is checked.
    2. Pick your OS in the Configure for: dropdown.
  4. Under the Triggers tab click New... and in the Begin the task: dropdown select On an event.

    1. Under settings select Basic.
    2. For the Log: field select Cisco AnyConnect Secure Mobility Client in the dropdown.
    3. For the Source: field select acvpnagent in the dropdown.
    4. For the Event ID: field type is 2039 and finally hit OK.
  5. Under the Actions tab click New... and in the Action: dropdown select Start a program.

    1. For the Program/script field provide your path to powershell. Usually this path is C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    2. For the Add arguments (optional) field type the path to the pshell_kms_activator script as: -WindowStyle Hidden -ExecutionPolicy Bypass -file "C:\your_path_to_script\pshell_kms_activator.ps1"
    3. For the Start in (optional) field the path to your script as: C:\your_path_to_script\
    4. Finally click OK.
  6. Configure the Conditions and Settings tabs as per your circumstances. I unchecked both Power options under Conditions. I left everything else unchanged.

powershell_kms_activator's People

Contributors

asadansari avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.