icacls – changing permissions on files and folders.

June 23, 2010

Update – Excellent Post  How to Handle NTFS Folder Permissions, Security Descriptors and ACLshttp://blogs.technet.com/b/josebda/archive/2010/11/12/how-to-handle-ntfs-folder-permissions-security-descriptors-and-acls-in-powershell.aspx

I was asked about changing permissions from the root of a drive and all sub-folders.  My immediate reaction was to use the Microsoft tool that replaced cacls – icacls.  Apparently the person that came up with the new name  “must” have just received their new iPad. <g>

I remembered a Technet article from a friend Gregg Shields – http://technet.microsoft.com/en-us/magazine/2009.07.geekofalltrades.aspx

Read the rest of this entry »


Start – Stop Service with Powershell and Ping

June 7, 2010

Ran into a request for an OCS Mediation Server that is contacting an OCS Front End Pool over a WAN link.

“We have a remote OCS Mediation server that contacts the OCS Front End Pool over a WAN link. I need that Mediation server to ping those front end servers periodically to verify that the WAN link is up. If the ping on two of the servers fails,  I need it to stop the OCS Mediation service on the mediation server until it can successfully ping the two front end server across the WAN again at which point it would then bring the Service on the Mediation server back up.”

 

With a LOT of assitance from Jeffery Hicks and Claus Thude Nielsen a simple script was created.

Read the rest of this entry »


Automate the Windows 2003 Defragmenter Without Paying Extra…

June 7, 2010

Taken from the Windows IT Pro site  —  http://www.windowsitpro.com/article/windows-shell-bat-and-cmd/automate-the-windows-2003-defragmenter-without-paying-extra.aspx

Excellent Article Daniel..!

Defragmentation is a great way to keep workstations and servers running

at their best performance. Windows Server 2003 comes with a

defragmenter: dfrgntfs.exe. However, you can’t automate this

defragmenter unless you purchase a program such as Diskeeper. I didn’t

have money for such a program in my budget, so I created and scheduled a

batch file named Defrag.bat.

As Listing 1 shows,

Listing 1: Defrag.bat

@Echo Off

defrag.exe c: -f

defrag.exe e: -f

defrag.exe f: -f

Read the rest of this entry »