Home » Scripting - Pagina 2


I had the following problem : I needed to rerun a program from the sccm distribution share on the server. When you create a scheduled task with schtasks.exe there is no way to configure the working directory for the program … Lees meer


This is an example how to read a value from an inifile with Powershell. #*************************************************************************** #** Script:   ReadIni.ps1 #** Version:  1.0 #** Created:  12/19/2010 11:09AM #** Author:   Adriaan Westra #** Website:  http://www.westphil.nl #** #** Purpose / Comments: #**    Get a value … Lees meer


This script will load the module SccmFunctions from the same directory the script is in. In the Module is the function Get-Sccmcollection defined. This function will return all members from a collection. The script will then loop through the members … Lees meer


This is a sample script to list all the computers in a domain or in a specific OU. If no OU is specified all the computers in the domain will be listed. #*************************************************************************** #** Script: get-ADComputers.ps1 #** Version: 1.0 #** … Lees meer


This is an example on how to ping a hostname or ipaddress with powershell. It makes use of the WMI Win32_Pingstatus to ping the address. #*************************************************************************** #** Script: ping.ps1 #** Version: 1.0 #** Created: 12/19/2010 11:09AM #** Author: Adriaan Westra … Lees meer


This Script uses the WSHShell object to create a shortcut on the users desktop. For this example A shortcut to notepad.exe is created with no additional arguments. The path for the users desktop is retrieved from the environment settings. #*************************************************************************** … Lees meer


This script will read an input file with users and add them to an Active Directory group. Every user needs to be on a separate line. Commandline : ./Add2Group.ps1 #*************************************************************************** #** Script: Add2Group.ps1 #** Version: 1.0 #** Created: 10:45 17-8-2014 … Lees meer