List-Collection.ps1

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 … Read More

get-ADComputers.ps1

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 #** … Read More

ping.ps1

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 … Read More

CreateShortcut.ps1

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. #*************************************************************************** … Read More

Add2Group.ps1

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 … Read More

© 2018 Westphil