
REM # create a scheduled task to run on demand

Invoke-Command -ComputerName $PC -ScriptBlock \TasksNoItemsSelected" /f /ve /t REG_SZ /d "Windows.undo Windows.redo lectall Windows.paste" Make sure no user input is expected at the other end. Wmic /node:laptop /user:".\administrator" process call create "REG.EXE ADD HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction /f /v Enable /t REG_SZ /d Y" Wmic /node: /user: process call create "" With wmic.exe you can execute any command on any PC. Note2: if wmic cannot find /FORTMAT:CSV or XML then use the switch /locale:ms_409Ĭhanges: added disable Service, added Create Restore Point, added Restore a Restore Point, service dependencies, group membership,send message, uninstall software by keyword. I give no permission to use it in a commercial environment. Note1: this tool is free and for educational purposes only. The wmitiool can be found here or in the file section below. The aim is to build an administration tool that can be used for local and remote PC's. I am working on a CMD script called wmitool. Good info on redirecting stdin and stdout can be found here at Microsoft.

I highly recommend to visit the page of my respected fellow countryman Rob van der Woude who has a very well documented website on this subject or DosTips. There are plugins that can be very useful. For scripting I advise to use Notepad++ since it recognizes the script language you write in and uses colors to make commands and blocks stand out. I hope you can find something useful here. In windows 7 it is still possible to do everything with DOS scripts. Since I am from the DOS age I always used to script my way around problems.
