Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Powershell script to batch update homedirectory user attribute data to include hidden share

$
0
0

Hi all,

I have been searching forum posts and although my need is simple, I'm obviously missing something basic.

What I need to do is update users who currently have their homedirectory mapped as such \\oldfileserver\username$ to \\newfileserver\username$ to include the append of the "$" after the username.

I can generate the list of users I want to target using get-qaduser as such:

Get-QADUser -SizeLimit 0 | where{$_.HomeDirectory -like \\oldfileserver*}

and then I know I need to pipe it to Set-QADUser to set the homedirectory to the new fileserver \ username$ but I'm not sure how to do this last bit.

Any help is appreciated.

Thanks!


Viewing all articles
Browse latest Browse all 2562

Trending Articles



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