How to script “Ownership” of NTFS File Systems…

2017-07-27T00:01:07+00:00 July 25th, 2012|Uncategorized|

There’s a time in every IT professional’s life where he or she will need to “Take Ownership” of files and folders that reside on an NTFS File Server (or in larger cases with hundreds or thousands of servers) in a Windows Server 2008 R2 or Windows 7 environment.  I’m sure most IT professionals already know how to do this in the Windows Explorer GUI … but what if your task at hand required that you script this process to run during a limited window of time given during a server migration, and you had to minimize the amount of “clicks” as well as the amount of time spent on multiple servers?  

I was recently assigned to a project very similar to the scenario described above; and after a little research, I stumbled upon a little-known Microsoft tool called ‘takeown.exe’ that has been shipping with Microsoft Server products since Windows Server 2003.  Within minutes of discovering ‘takeown.exe’ I had a script written and I was running it in my test environment with positive results.  This shows how simple the tool really is!

Below is the usage example as seen from the command line ‘takeown.exe /?’:

[/S system [/U username [/P
[password]]]] /F filename [/A] [/R [/D prompt]]

Below is my personally recommended example: 

TAKEOWN.exe /F C:MyFolder /R /A


As expressed above, my suggestions are to use the /F (to specify the folder to apply ownership on), the /R switch (as in “recursive” which mean to apply to all child objects, sub-folders and files) and the /A switch (which gives ownership to the “Administrators” group instead of the currently logged in user).  And while I didn’t use the /D switch in the above example, it may be necessary to use the “/D Y” to avoid being prompted in cases where the user ID running the command does not have rights to list the folders.   

You can also reference additional parameters by typing in ‘takeown.exe /?’ from the command prompt on any Windows Server 2008 R2 server or Windows 7 machine.


Send an Email from the Windows Commmand Prompt or Script…

2017-07-27T00:01:07+00:00 July 18th, 2012|Uncategorized|

Today, Avi and I were discussing one of the requirements of an application he’s working on;  it seemed simple enough at first blush…

He needed to send an email from a Windows 7 computer — which is fairly straightforward if you happen to have something like BLAT installed, or if you’re able to script a call to a nearby SMTP gateway.  However, there was one major requirement this time:  it had to appear to come from the *user* of the application, with the user’s intent/blessing/permission. 

Yes, Avi could have configured the application to make a direct call to the local email client executable — if there were guaranteed to be one (not necessarily the case), and if the version/type were to be predictable (it might be Outlook, it might be GroupWise, etc.) to properly call with the correct options and flags.  Avi did some digging and soon found a way to get a fully formatted message to launch in Outlook, but we had to modify it a tad to get it to work in both GroupWise and Outlook (and perhaps others).  Here’s what we settled on, and how it works…

Aside: I’ll have to assume that your GroupWise or Outlook is properly installed and configured for these things to work.

Let’s start with the basics (pun intended); this should launch your email client and pre-populate the recipient (interestingly, it should work no matter whether your email client is configured or not):


…but you knew that, and you’re clearly not impressed.  Now perhaps the trickiest part: after the recipient in the command — and before the next component (I use Subject in this example) — it is best to use a question (?) mark here for Outlook *and* GroupWise compatibility, although a caret+ampersand (^&) will work if using Outlook only (note that the “%20” is a space character):


…and now you’re intrigued.  Let’s build on that.  Next, we tack on another option in the command (I show the CC option here), separated with a caret+ampersand (^&) :


…and now I’ve won you over.  Cool!  Let’s complete the line — separated by more caret+ampersand (^&) characters, of course — and make it a fully populated email, ready-to-send:


Now click send, and enjoy!



Coretek Services Recruiting Event…

2017-07-27T00:01:07+00:00 July 12th, 2012|Uncategorized|

Okay, folks…  It’s probably no surprise that, as a consulting company, we are always on the lookout for the best people to come and be part of our team.  We spare no effort to search out and find (and keep!) quality individuals that want to have a great career in Information Technology, and can uphold the Coretek Values and Mission

We are a fast-growing consulting services organization with opportunities ranging from entry-level to senior enterprise consultant levels.  Our philosophy is to bring in people that are highly motivated, with a thirst and aptitude to explore new technologies. 

We work hard — and play hard — here at Coretek Services!  As a relatively new person to the team myself, it is so exciting to see the dynamics here, and to have the opportunity to work with people who put helping others and our customers success at the top of their priority list.  Coretek has many highly-skilled, multifaceted, technologists to learn from and to help grow your career.  

So now, we’re throwing open our doors and inviting you in!

We’re having an in-house Recruiting Event so that you can come in and meet us in-person — and find out what we’re really all about (more than just a blog post could possibly relay).  So come and join us!  Our Recruiting Event information is as follows:

  • When:  Tuesday, July 17th 2012
  • Time:  3:00pm to 6:00pm
  • Location:  Coretek Services office

38505 Country Club Drive
Suite 210
Farmington Hills, Michigan 48331


To RSVP, send a resume to:  Wendy McQuiston ( )

But you ask…  What will the evening be like?  Will there be food?  Will you actually meet a real Coretek representative?  Actually, all good questions! 

There will be a company overview given to the group at the start of the event.  Then, we will sweep you away to one-on-one interviews with our folks.  You will get to speak to different people, and share your background, skillsets, etc.  We are not a job-shop, or head-hunting organization;  we actually *care* about who you are and what you’re all about; so we take the time, so we don’t waste your time.

We will also have some snacks/finger food appetizers.  So it is both a social, comfortable setting, and an interview format.

I hope to see you there!