0 votes

I'm working on user deprovision and need to re-assign a user's home directory to the manager's home directory after disabling. I found a PowerShell script on this site to re-assign the home directory to the manager, but it only works if those fields are populated in Adaxes. We cannot populate the home directory fields, as our user drives are assigned via login scripts and having a value assigned in Adaxes to the home directory path will step on the script and it will fail to run correctly.

I've been tampering with the PowerShell script on this site to try and modify it for our needs. Each user's home directory is in a path similar to \server\volume\users\%username%. Retrieving the user's home directory path is easy, since I can add the variable for %username%. However, how do I retrieve the same for the Manager? I'm a PowerShell novice, so excuse my ignorance.

by (60 points)

1 Answer

0 votes
by (226k points)

Hello,

In a similar way like the %username% value reference, you can use the %adm-ManagerUserName% one to obtain the username of the account manager. Make sure to place value references into double quotes in your scripts. For more details about using value references, have a look at the following help article: https://www.adaxes.com/help/ValueReferences.

Also, the following article should be helpful in writing scripts: http://adaxes.com/sdk/ServerSideScripting. If you still have issues writing the script you need, please, provide all the possible details regarding the required behavior with live examples.

Related questions

0 votes
1 answer

When running a PowerShell script as an action in a custom command, you can set the script to run as a different account and then use the RunAs property in the ... Is there another way to get the Adaxes service account's credentials from within the script?

asked Mar 31 by KelseaIT (320 points)
0 votes
1 answer

Let's say I have a Business Rule that is fired prior to adding members to a group. Is it possible to get the number of objects being added to that group as ... that tells me that 6 objects will be added or is each added user treated completely independently?

asked Apr 20 by ngb (90 points)
0 votes
1 answer

How can I allow manager of distribution group to edit just email aliases (proxy addresess) of that group? Not the primary SMTP address.

asked Nov 19, 2019 by KIT (520 points)
0 votes
1 answer

Receive "Index operation failed; the array index evaluated to null. Stack trace: at <ScriptBlock>, <No file>: line 104>" and "Index operation failed; the ... $GroupName, $GroupDN." } } #foreach write-output "" Write-Output "" Stop-Transcript

asked Apr 14 by jbahou (20 points)
0 votes
1 answer

Is there a way to have a Scheduled Task with 4 different condition? I want to create a scheduled task start every Monday and the condition see: The next Saturday of the week ... of the week is the fifth of the month then no action Thanks in advance, Simone

asked Jan 18 by Simone.Vailati (270 points)
2,779 questions
2,512 answers
6,574 comments
26,121 users