0 votes

For the first time today I got a runtime error when running a deprovisioning action on a user account. I initiated this through the web interface and it sat for 30 minutes before displaying the standard IIS error screen "Server Error in '/Admin' Application"

As part of the deprovisioning command I have it moving the users backup folder and I'm guessing this is what took so long, and maybe eventually caused a time out? Is there anyway I can have this run in the background and not hold up the web interface?

Thanks

by (920 points)
0

Hello,

Yes, this can be done. How do you move the user's backup folder? Do you use certain PowerShell code for this purpose?

0

I'm using the built-in method. See screenshot below:

0

OK. In this case, you can move the home directory using a script. In the script, the user's home directory will be moved with the help of a PowerShell script, and the script will be run in a separate PowerShell process. In this case, it won't matter how long moving a user's home directory takes, however you should keep in mind that should any errors or warnings occur in the process, you won't be able to see them.

We've already assigned our script guys to write a script for you and will update this topic as soon as they come up with something.

0

Any updates on this?

Thanks
Ryan

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello Ryan,

Yes, the script is ready. Here it is:

$homeDirectoryPath = "%homeDirectory%" # TODO: modify me
$destinationPath = "\\server\share\%username%" # TODO: modify me

# Script block
$scriptBlockToExecute = @"
& {
    Copy-Item -Recurse -Path '$homeDirectoryPath' -Destination '$destinationPath' -Force
    Remove-Item -Recurse '$homeDirectoryPath' -Force
  }
"@

# Start Windows PowerShell as a separate process and run the script block in that process
$arguments = @("-noninteractive", "-noprofile", "-executionpolicy bypass", "-Command $scriptBlockToExecute")
$powershellPath = "$env:windir\syswow64\windowspowershell\v1.0\powershell.exe"   
$starProcessInfo = New-Object System.Diagnostics.ProcessStartInfo
$starProcessInfo.FileName = $powershellPath
$starProcessInfo.Arguments = $arguments
$starProcessInfo.WindowStyle = "Hidden"
$starProcessInfo.CreateNoWindow = $True
$process = [System.Diagnostics.Process]::Start($starProcessInfo)

In the script:

  • $homeDirectoryPath: specifies a template for the user's home folder path. It is set to the %homeDirectory% value reference that will be replaced with the user's home folder path stored in the Home Directory property.
  • $destinationPath: specifies a template for the path to the folder where the user's home folder will be moved.

Modify the script to your requirements.

To use the script in your Custom Command for deprovisioning:

  1. Launch Adaxes Administration Console.
  2. Locate and select the Custom Command that you use for deprovisioning.
  3. In the Result Pane (located to the right), double-click the built-in action that moves home directories of users.
  4. Select the Run a program or PowerShell script action and paste the above script in the Script field.
  5. Enter a short description for the script and click OK.
  6. Save the Custom Command.
0

Thank you!

Related questions

0 votes
0 answers

Hello, after upgrading to Adaxes 2023 we lost connection to Web Interface Configurator. Adaxes and Adaxes Web Interface are ok and users are able to login. URL http: ... went ok except I had to start manually Softerrra Adaxes service after restoring settings.

asked Nov 28, 2022 by juhota (210 points)
0 votes
1 answer

We get the following error when attempting to edit a room or equipment mailbox in the web interface. We can edit them using the admin console. I am a full Adaxes Admin so I don't think permissions. I also don't see an error in the logs.

asked Dec 9, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

I think this started happening back in August when we updated to the current version (3.13.18.106.0). We are not sure though because this only affects the web page ... We would prefer not to allow access through a firewall for this. Screenshot of the error:

asked Nov 23, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

Hi All, We have a reoccuring "Access is Denied" error for our Web Interface sites. This started frequently after upgrading to 2018 version and frequent reboots seem to clear ... the website, restarted the app pool. Still the same error - any advice? Thanks!

asked Jan 4, 2019 by jmarcellus (50 points)
0 votes
0 answers

Good afternoon Support, I have configured a new stack of servers in the same topology of our existing environment but have hit a snag when trying to terminate SSL on the F5 ... 7.13122.0 and 3.7.11926.0 running Windows Server 2012R2 fully patched by Microsoft.

asked Jul 12, 2016 by strikk (360 points)
3,548 questions
3,238 answers
8,232 comments
547,810 users