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.

SCCM 2012 SP1 Installation Preparation

Hi SysAdmins

In this post I would like to go through the prerequisites and actions you need to do before you go on and install SCCM 2012 SP1.

If you want, you can jump to the installation procedure of SCCM 2012 SP1, on my earlier post: How to Install SCCM 2012 sp1.

The following are needed before starting the SCCM 2012 installation:

Continue reading SCCM 2012 SP1 Installation Preparation

How to Install SCCM 2012 sp1

Hi SysAdmins

In this post I will go through the process of installing a SCCM 2012 sp1 server.

If you haven’t done so yet, please read my post about SCCM 2012 SP1 Installation Preparation.

This installation is good for lab or production environment.

We all know the power of Microsoft System Center Configuration Manager. Microsoft invested many efforts in this new edition of SCCM.

Forget about the old mmc 3 snap-in and get ready for a new experience and features.

In this tutorial I assume you already prepared the prerequisites for the installation.

Continue reading How to Install SCCM 2012 sp1

How to Retrieve a Password of an Application Pool User in IIS 6

Today I needed to set a SPN for a IIS application. I discovered that I lost the password of the user account which I need to configure on the application pool.

Luckily, there is a way to retrieve/decrypt the password if it is configured on an existing Application Pool.

This is done by using a Microsoft tool on the IIS server – adsutil.vbs.

Here are 5 simple steps to do this:

Continue reading How to Retrieve a Password of an Application Pool User in IIS 6

System Administrators Tricks