Playing with folders and permissions

This one will be short and sweet. Smiješak

Imagine you have an Active Directory full of users. You also have a file server in your environment. And, as it happens, each of your users needs to have a folder created just for himself, on this file server. Each folder should have inheritance disabled and each user should get full permissions on his folder.

What do you do?

Well, we can manually create the required folders, or we can use a PowerShell script which will do it for us. Obviously, I’ve chosen PowerShell (maybe not the nicest script in the world, but it does the job), or this post would be… lame. Smiješak

So, the interesting part of this script goes like this (I’ve added a few empty lines to make comments more visible):

Cheers!

Installing the KB2920189… successfully!

The other day, I’ve written about an issue with installation of update KB2920189 for Windows Server 2012 R2 (post called [TIP] Latest “Patch Tuesday” & errors installing update). So, the problem I was facing was failing installation on Generation 2 virtual machines, with Secure Boot enabled.

Actually, you can overcome this problem easily by reading the documentation before it happens or… with PowerShell after (OK, you can use GUI also, but who uses it nowadays?)! Smile

As I’ve already mentioned, all you need to do is just one thing – install the BitLocker feature on your server.

(yes, “-Restart” is optional – if you want, you can restart your server manually, of course)

image

After that, BitLocker is installed, and you can successfully install the KB2920189 also.

Second (not official) approach on installing this update on Generation 2 virtual machine, as I’ve written in the mentioned post, is to uncheck Secure Boot, install the update, and then check the Secure Boot option again.

This can be easily done using the following script:

We can now install this “problematic” update as the Secure Boot feature is disabled:

image

image

…and Secure Boot is enabled again (“nothing” happened)!

Of course, you can do all of this manually, but then again – why do we have PowerShell? Smile

Cheers!

P.S. I’m no PowerShell expert… just like to automate some things. Smile

Windows Server 2012 R2 Preview – Upgrade tips

If you are planning to upgrade your Windows Server 2012 to the Windows Server 2012 R2 Preview (and you are not planning to spend some time reading the documentation), here are some tips that can help you make this more quickly, and (hopefully) without errors:

  • CREATE A FULL BACKUP! (before proceeding with upgrade, of course)
  • you can only upgrade Windows Server installation which is installed onto physical disk (i.e. you cannot upgrade Boot from VHD(X) installation, as you will get error saying this in compatibility report before upgrade starts) (note that you still can upgrade Windows Server installation in virtual machines, though)
  • make sure that you have enough disk space available (the compatibility report says that at least 42609 MB of free space is required)
  • make sure that your applications (and drivers) support Windows Server 2012 R2 (unfortunately, site with the compatible apps and documentation (as it says inside the upgrade wizard – http://go.microsoft.com/fwlink/?LinkId=243105) still isn’t alive, so you can’t check your applications there)
  • make sure that you have enabled page file on C: drive (I’ve had one on D: only, and the upgrade kept failing until I’ve create one on the C: drive also)
  • make sure that you don’t go online and install updates during installation (as this will probably make the upgrade fail, saying that it cannot open Compatibility report)
  • remember – if you get error during upgrade, you can always check upgrade log files located in “$WINDOWS.~BTSourcesPanther” (or “%WINDIR%Panther”) folder

I will update this list as something new comes up (also, feel free to comment with your upgrade experiences).

Thanks for reading (and good luck)!