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 (272k 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 (220 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 (910 points)
0 votes
1 answer

Hi, In the SDK I find information on how to use Powershell to read and create scripts in custom commands and business rules, but I can not find the same for ... information like the embedded scripts for the report and custom columns? -- Morten A. Steien

asked Jul 27, 2023 by Morten A. Steien (300 points)
3,346 questions
3,047 answers
7,781 comments
544,981 users