Server 2012r2 Home Folder

I started using the Profile tab for user's in Active Directory (2012r2) to map a network drive for the specific user.  We use to do this before by putting a login script in the startup folder on the client machines.  The login script would map the company network drives as well as each individual users drive on the server.  I have now started to use Group Policy to map our network drives, but needed a way to map individual user drives.  For this reason just used the AD Profile tab for these individual drives.  It works just fine but I had a user complain to my about his PowerShell when opened defaulting to this network user drive now.  I have also noticed that within the individual network user drives there is now a windows folder created automatically.  Is this the reason for the PowerShell issue?  Is there away around this?  Is there a way to set this so the windows directory is not created in the users network folder?
Michael McGuireSystems AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SeanSystem EngineerCommented:
The windows folder is used to store user specific settings. There is nothing you can do to prevent it.

Powershell settings is also normal as it is set to open into the user's current working directory (home) but you can change it with a profile.

In your Documents folder, find the directory named WindowsPowerShell. If it does not exist, that's ok, just create it.
Create a new file named profile.ps1 in the WindowsPowerShell folder.
Open profile.ps1 and add the following command to set your default working directory:

Set-Location C:\my\default\working\directory
Open a new powershell window... the changes should have taken effect.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
using the home drive path in a user profile sets the user's home folder variable to that drive letter where it's mapped.

That behavior is consistant for at least thae last 15 years, so nothing new there.

I do find this annoying myself at times.

You could get aeound this by changing the environmental variables for the user once the user logs on.

the user could also right click on their link to powershell and simply change the "start in" folder option to the path they prefer.

(option 2 seems the simplest and least likely to cause any issues)
Michael McGuireSystems AdministratorAuthor Commented:
Thanks!  Both suggestions worked.  As a side note I had to set the Execution Policy on PowerShell to get the Profile.ps1 to work.  You get a error if you don't change it.
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
Glad to help! :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.