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 (294k 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, 2022 by KelseaIT (320 points)
0 votes
1 answer

Hi All, I am currently using the 30 day free trial of Adaxes and seeing if we can use it to achieve our method of user provisioning. I am looking into server-side ... variable value within an SQL query Can this be achieved? Any help is much appreciated, Thanks

asked Feb 1 by Lewis (40 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, 2022 by ngb (290 points)
0 votes
1 answer

How I can ignore a part of the lastname in username composition? Example: In the fullname "John da Silva", "da Silva", is the lastname, so, I need ignore the "da " in the composition of username, when I create the new user.

asked May 22 by fgmello (40 points)
0 votes
1 answer

I need to send an e-mail to the owner ("managed by") for each group. The e-mail should contain a list of group members. What is the best way to do that?

asked May 9 by akindy (40 points)
3,588 questions
3,277 answers
8,303 comments
548,096 users