Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to change home drive server from list

$
0
0

Hi

I have a list of user which I need to change the home drive path - I am starting from this script and I would like to use a foreach command but I can't my head around:

Get-ADUser -filter {homedirectory -like "*domainname*\homefolders*"} -property homedirectory | select Name, Samaccountname, homedirectory 

The home drive is set to DFS path which I am changing back to point to the file server name - so the path on AD Users Account should be: \\FPS01\homefolders\%username% 

How can I make a foreach command to change the path please?

Maelito


Maelito


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles


Pregnant woman released on bail


Waves Complete v2019.02.14 Incl Emulator-R2R


It’s Kind of a Funny Story 2010 Dual Audio 720p BRRip [Hindi – English] ESubs


CalCen


Serial child killer David Threinen’s reign of terror


Pumped up UDA chief ordered teen to be shot


MCGEE, SAMUEL O., DECEASED, OF...


Alison Moyet - Alf (Deluxe Edition) (2016) flac


Shawn Ogrodnik


WordPress: Reverse Shell



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>