Creating a Home Drive with Windows PowerShell

With the following script I will do 3 things:

1. Set the user his home folder with drive letter
2. Create a folder on your home folders file share
3. Giving users full control on there folder.

 

The Script:

Get-ADUser -Filter * -SearchBase “OU=wardusers,DC=wardvissers,DC=local” | Foreach-Object {
$sam = $_.SamAccountName
$sid = $_.Sid
$HomeDrive=’J:’
$Domain=wardvissers.local’
$UserRoot=’\\wardvissers.local\dfs\home\’
$HomeDir=$UserRoot+$sam

# Assign the Drive letter and Home Drive for the user in Active Directory

SET-ADUSER $sam –HomeDrive $HomeDrive –HomeDirectory $HomeDir

# Create the folder on the root of the common Users Share

NEW-ITEM –path $HomeDir -type directory -force

$account=$Domain+’\’+$Accountname

# Set parameters for Access rule

$rights=[System.Security.AccessControl.FileSystemRights]::FullControl
$inheritance=[System.Security.AccessControl.InheritanceFlags]”ContainerInherit,ObjectInherit”
$propagation=[System.Security.AccessControl.PropagationFlags]::None
$allowdeny=[System.Security.AccessControl.AccessControlType]::Allow
$dirACE=New-Object System.Security.AccessControl.FileSystemAccessRule ($sid,$rights,$inheritance,$propagation,$allowdeny)
$dirACL=Get-Acl $HomeDir

$dirACL.AddAccessRule($dirACE)

Set-Acl -path $HomeDir -AclObject $dirACL

Write-Host $HomeDir access rights assigned

}

Windows Server 2012 R2 Hyper-V Component Architecture Poster

Provides a visual reference for understanding key Hyper-V technologies in Windows Server 2012 R2 and focuses on Generation 2 virtual machines, Hyper-V with virtual hard disk sharing, online virtual hard disk resizing, storage quality-of-service, enhanced session mode, live migration, Hyper-V failover clustering, and upgrading your private cloud

image

Free eBook: Introducing Windows Azure for IT Pro’s

There is a new and free eBook on 0131_9780735682887x_thumb_19F1014EWindows Azure from Mitch Tulloch and the Windows Azure team designed specifically for the IT Professional.  If you haven’t had a chance to try Windows Azure or your just looking to learn more then this book is a good place to start.WinAzure_logo_Cyan_rgb_D

The book goes into detail on most Windows Azure services along with screenshots to demonstrate the capabilities of the platform.  If you have a bit more experience there are some under the hood insights and expert tips from insiders who develop, test and use the Windows Azure Platform.

You can download the PDF here and there is also companion content available here.

Microsoft release a cool tool named Disk cleanup on Windows 7 Sp1

Microsoft released an update yesterday for the Disk cleanup utility. The problem Windows keeps copies of installed updates from Windows Update, even after installing newer version of updates. So the older versions of updates that are no longer needed and taking up space.

In Windows XP era the uninstalls were just hidden folders under Windows directory so easy to clean. Since Windows Vista this is now stored in the Windows Services folder WinSXS.

The space used by WinSXS can grow significant. In the past you could remove Service Pack uninstall files which helped, but Service Packs are not so common anymore. I think Windows 7 will never see SP2, yet the updates keep filling the WinSXS folder every month.

After the update is installed (no reboot needed) and you run Diskcleanup:

cleanup1

and when you click “Clean up system files”

You’ll see new options:

cleanup2

This update of diskcleanup delivers a new option Windows Update cleanup which deletes older versions of updates that are no longer needed and just taking up space.

The update is available through Windows Update as important or direct download at KB article posted below:

KB2852386: Update is available that enables you to delete outdated Windows updates by using a new option in the Disk Cleanup wizard in Windows 7 SP1

Now unfortunately this update is not available for Windows Server 2008 R2, while there are plenty scenarios where cleaning up WinSXS folder is helpful there too!

Bink.nu

KMS Update adds support for Windows 8.1 and Windows Server 2012 R2 clients to Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 2012 KMS hosts

This update extends the Key Management Service (KMS) for Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 2012 to enable the enterprise licensing of Windows 8.1 and Windows Server 2012 R2.
KMS provides support for the following KMS client activations:

  • Windows Vista
  • Windows Server 2008
  • Windows 7
  • Windows Server 2008 R2
  • Windows 8
  • Windows Server 2012
  • Windows 8.1
  • Windows Server 2012 R2

KMS uses a KMS host key to activate itself on a KMS host and to establish a local activation service in your environment. This update extends support for KMS to provide activation for Windows 8.1 and for Windows Server 2012 R2.

Click here for the downloads

High CPU usage Windows Update (svchost.exe) in Windows XP SP3

I had to do a fresh Windows XP SP3 installation and Windows Update has been using almost whole CPU. Very strange!

 

I fixed that problem by installing Microsoft Security Bulletin MS13-069 update  from Microsoft web.

Free ebook: Introducing Windows Server 2012 R2 Preview Release

We’re very excited to announce another free ebook offering from Microsoft Press. Introducing Windows Server 2012 R2 Preview Release (ISBN 9780735682931), by Mitch Tulloch with the Windows Server Team, introduces new features and capabilities, with scenario-based advice on how the platform can meet the needs of your business. Get the high-level overview you need to begin preparing your deployment now. This book is based on the Preview release and will be updated to cover Windows Server 2012 R2 RTM.

Download the PDF version of this title here (108 pages, 5 MB). UPDATE: The EPUB format is here and the MOBI format is here.

Watch for the lengthier RTM edition of this ebook later this year!

If you prefer a hard copy of the book, you can order it here.

image

Exchange 2013 and .NET 4.5 fixes KB2803754 & KB2803755

Microsoft published an important hotfix for .NET 4.5 earlier this year. It wasn’t picked up on by many, therefor a quick write up on the matter.

Since Exchange 2013 is built on top of .NET 4.5, it is recommended to install the hotfix on all Exchange 2013 Mailbox and Multi-Role servers. The hotfix will reduce the memory consumption of the store worker processes.

If you’re using Windows Server 2008 R2, the hotfix is KB2803754 and can be requested here; when using Windows Server 2012 the hotfix is KB2803755 which can be requested here.

After installing the hotfix, you need to do one of the following things:

  • Set the following registry key:
    HKLM\Software\Microsoft\.NETFramework\DisableRetStructPinning=1 (REG_DWORD)
  • Set the COMPLUS_DisableRetStructPinning environment variable to 1

I’d prefer the first option. Note that you need to restart the server for the change to become effective.

Thanks to EighTwOne

Translate »