Giter Club home page Giter Club logo

delprof2_batchrunnerandlogger's Introduction

Delprof2_BatchRunnerAndLogger

A PowerShell script to run Delprof2 on multiple remote computers and log the results

Description
This script will run the application Delprof2 on multiple computers with the given parameters and log the results. This can be usefull for machines that get filled up with userprofiles.

Requirements

How to Use

  A;B;C;D  
  newline = new computer
  A) Name of the Computer
     (/c parameter in Delprof2)
  B) true=run simulated (WhatIf)
     false=run
     (/l parameter in Delprof2)
  C) Only delete profiles that has not been used in X days.
     (/d parameter in Delprof2)
  D) Description, just notes
  
  Example: DESKTOP123;false;7;Meeting room computer, delete userprofiles not used in one week.
  • Download the script and change the following variables:
    $computers_txt = "D:\Delprof2_BatchRunnerAndLogger\computers.txt" #textfile with list of computers and parameters
    $computers_txt_skip_lines = "1" #How many lines to skip in $computers_txt file (If you want to write some instructions in top etc)
    $delprof_log_folder = "D:\Delprof2_BatchRunnerAndLogger\logs" #folder where the Delprof2 logs are saved
    $script_log_folder = "D:\Delprof2_BatchRunnerAndLogger\logs" #folder where script logs are saved
    $script_log_filename = "scriptrun_log.txt" #name of the script log
    $delprof_exe = "D:\Delprof2_BatchRunnerAndLogger\DelProf2.exe" #location of DelProf2 exe-file.
  • Run or add to Windows Task Scheduler

Running as Task in Windows Task Scheduler

Here is an exable of action:

    Program/script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add arguments (optional): -noprofile -executionpolicy bypass -file "D:\Delprof2_BatchRunnerAndLogger\Delprof2_BatchRunnerAndLogger.ps1"
    Start in (optional): D:\Delprof2_BatchRunnerAndLogger\

Changelog

  • 27.02.2019
    • Release

delprof2_batchrunnerandlogger's People

Contributors

anderscan avatar flemmingss avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

porqemada

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.