Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » Active Directory and PowerShell

Thread: TsHomeDrive and TsHomeDirectory bug

This question is answered.


Permlink Replies: 4 - Pages: 1 - Last Post: May 27, 2009 3:03 AM by: Andrey Moiseev ...
Shay Levy


Posts: 1,919
Registered: 1/31/08
TsHomeDrive and TsHomeDirectory bug
Posted: May 26, 2009 6:45 AM
 
  Click to reply to this thread Reply

Seems that the properties are switched upon update (v1.2):


# TsHomeDrive value is written to TsHomeDirectory 
PS > Get-QADUser user1 | Set-QADUser -TsHomeDrive "Q:"
PS > Get-QADUser user1 | fl ts*

TsHomeDirectory : Q:
TsHomeDrive     :


# clear values
Get-QADUser user1 | Set-QADUser -TsHomeDrive $null -TsHomeDirectory $null


#TsHomeDirectory value is written to TsHomeDrive 
PS > Get-QADUser user1 | Set-QADUser -TsHomeDirectory "Q:"
PS > Get-QADUser user1 | ft ts*

TsHomeDirectory :
TsHomeDrive     : Q:


Message was edited by: Shay Levy

Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
G4meDTP

Posts: 7
Registered: 5/19/09
Re: TsHomeDrive and TsHomeDirectory bug
Posted: May 26, 2009 8:37 AM   in response to: Shay Levy
 
  Click to reply to this thread Reply

I am not certain this is associated, but I have noticed that since installing PS v1.2 with PowerGUI 1.7.1.702, some of my PS scripts pop DLL errors, but complete normally. I am hoping PowerGUI 1.8 resolves.
Either way, it appears v1.2 changes some items under the hood.



Andrey Moiseev (Quest)

Posts: 415
Registered: 9/4/07
Re: TsHomeDrive and TsHomeDirectory bug
Posted: May 27, 2009 1:06 AM   in response to: Shay Levy
Answered
  Click to reply to this thread Reply

Yes, Shay, you're right. It's a bug. Thanks for escalation!
Will be fixed in upcoming 1.2.2 maintenance release.




Shay Levy


Posts: 1,919
Registered: 1/31/08
Re: TsHomeDrive and TsHomeDirectory bug
Posted: May 27, 2009 1:57 AM   in response to: Andrey Moiseev ...
 
  Click to reply to this thread Reply

Thanks for the confirmation. BTW, on Server 2008 I get an error when I do:

PS > Get-QADUser user1 | Set-QADUser -TsHomeDirectory $null -TsHomeDrive $null
Set-QADUser : Exception has been thrown by the target of an invocation.

Does it relate to this issue?

Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
Andrey Moiseev (Quest)

Posts: 415
Registered: 9/4/07
Re: TsHomeDrive and TsHomeDirectory bug
Posted: May 27, 2009 3:03 AM   in response to: Shay Levy
 
  Click to reply to this thread Reply

No, this is another issue.
TsHomeDrive can be set only if TsHomeDirectory is also set, and TsHomeDirectory points to some network folder (starts with "\\").
To clear the TsHomeDrive value, you should not directly pass $null to TsHomeDrive. Instead, you should pass to TsHomeDirectory either $null, either some local path (not starting with "\\"), for example "C:\local".
This is indeed AD behavior, not our product specific. All we can do is try to avoid ugly error messages and return some more user-friendly output.


Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums