Category Archives: Scripting

How to Ping a List of Computers

Many times It happens that we need to check if a list of computers is active, so how do you ping multiple computers at once?

Use this Powershell script to test connectivity to your list of computers. it will produce two lists of Bad (unresponsive) and Good(Responsive) computers.

You need to change “D:\scripts\list.txt” to the path where your saved your computers list file(.txt).

Also, you can un-comment  #Write-Host $name… to view the list of computers with different colors Continue reading How to Ping a List of Computers

How to run python script on notepad++

How to  Configure Notepad++ to run a python script via python IDLE

If you are learning python and want to use notepad++ as a free as well as simple and easy to use editor, follow these simple steps:

Install python (2.7.x)

First thing: Download the python 2.7.x (current is 2.7.13) windows installer from http://www.python.org/download/ using the default settings. It should install python in the folder: C:\Python27. You can use a different version of python, just substitute out the version number wherever you see 27. Continue reading How to run python script on notepad++

Create SCCM Distribution Point with Powershell

Hi Sysadmins

You need to create multiple SCCM 2012 Distribution points fast and accurate!

Maybe you decided on upgrading your  environment to SCCM 2012 or your company purchased another organisation. In any case,

The reasonable way will be to use a script, and not use the GUI to do the task over and over.

The preferred scripting environment is Powershell, since it already has many Configuration Manager commandlets that can be helpful.

You do have to work with at least SCCM 2012 sp1 version for the following script to work.

The below Powershell script will read the names of the Distribution points servers from a file. See example for the file Here 

Continue reading Create SCCM Distribution Point with Powershell

How to install IIS features on SCCM 2012 Distribution Point with command line

Hi SysAdmins

Did you ever wonder how SCCM 2012 install a DP remotely from the CM console?

DISM.exe (Deployment Image Servicing and Management tool) is a command line tool that you can use to enable or disable Windows features.

In this case we use it to install all the necessary IIS features for a SCCM 2012 DP.

Command line to install IIS on DPs:

Continue reading How to install IIS features on SCCM 2012 Distribution Point with command line

Copy files to Remote computers using powershell

Hi SysAdmins

In an earlier post I described – How to copy files to domain member computers or servers using Group Policy Object (GPO).

In this post I will show how to copy files to remote computers or servers using a simple Powershell script and .txt file.

728x90_never-forget-password

All you need is:

A txt file that looks like this:

Server1.yourdomain.com
Server2.yourdomain.com
Server3.yourdomain.com
and so on…

You can use IP addresses as well.

And this piece of Powershell code:

[code lang=”powershell”]

$ServerList = Get-Content "C:\ServersList.txt" #Change this to location of servers list
$SourceFileLocation = #For example: D:\FoldertoCopy\ or D:\file.txt
$Destination = #Example: C$\temp

foreach ($_ in $ServerList)
{Copy-Item $SourceFileLocation -Destination \\$_\$Destination -Recurse -PassThru}

[/code]

Save the above code as CopyFilestoservers.ps1, and your servers list as ServersList.txt

You will need Write permissions on the remote machines to run the script successfully.