0 votes

We're using a powershell command to delete computer accounts from the domain. This works fine but even though it works, on refresh, the page shows essentially an 'Object Not found' message.

This makes sense as the object has been successfully deleted. Is there any way to override this behavior and show the user that "HEY THAT ACCOUNT WAS DELETED - GOOD JOB!" type message?

Here's the script we're using:

Import-Module Adaxes

# Get computer domain name
$domainName = $Context.GetObjectDomain("%distinguishedName%")

Remove-AdmComputer -Identity "%cn%" -server $domainName -AdaxesService localhost -Confirm:$False
by (610 points)

1 Answer

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

Hello,

You can use the Delete Home Page Action. In this case you will only see the Operation Succeeded message in the Web Interface header. For information on how to create the action, have a look at the following tutorial: http://www.adaxes.com/tutorials_WebInte ... htm#delete.

0

We've looked at both the Delete Home Page action as well as the Delete function within the "View Computer" form. While the first would work, it's not our preferred method.

The second option, which presents itself as a big 'X' in the upper right corner of the View Computer dialog box would also work (and work better) but something odd occurs when we use it.

When a computer object is deleted in this manner, the resulting screen (which is a view of the parent OU) presents a "Create New: User/Contact/Group/Computer/OU" top navigational bar. We'd like this removed but can't figure out where it's coming from. This navbar doesn't show up anywhere else. This may actually be the same behavior with the Delete Home Page action just haven't tried it yet.

Any ideas?

Thanks!

0

Hello,

The icons are displayed depending on the permissions granted to users by Security Roles. Most probably, you are signed in to the Web Interface as the default service administrator and thus you can see all the icons because you. When signed in as a user that does not have permissions to create specific objects, corresponding icons will not be displayed.

If you want to totally disable the icons for a Web Interface, have a look at the following post on our forum: Remove "Create New" from OU view.

0

OK thanks, that did it. Modifying the web.config using the instructions in the previous thread worked to remove the "Create New..." options. We use custom forms in this particular interface anyhow so no big deal. Will just leave myself some instructions when we next upgrade ADAXES.

Thanks again!

0

Hello,

Starting from the next major release, you will not need to modify configuration files to remove the Create New icons. There will be built in functionality.

Related questions

0 votes
1 answer

Hello, we cannot delete users with adminCount=1 with the buildin action "Delete the user" because of missing (adminSDHolder)permission to delete users as ... $identity = "%distinguishedName%" Remove-AdmUser -Identity $identity -Confirm:$False regards Helmut

asked Nov 17, 2020 by a423385 (510 points)
0 votes
1 answer

I would like to know if it is possible to create a field in the web UI under user management to "assign" a machine to a user. I would like to be able to put the ... be moved to "workstation OU. Is there s custome field that can be used to accomplish this?

asked Oct 22, 2020 by copatterson (70 points)
0 votes
1 answer

I have two domains where a sub-set of users are a mirror of each other. When a deprovision is run in the primary domain I would also like it to perform the ... on as well, possibly by calling a separate custom command where I can have different steps.

asked Mar 25, 2016 by Infounlim (470 points)
0 votes
1 answer

I want to create a custom Deprovission command which exports the mailbox of the user to a pst file, when it's completed the account should be deleted. Can this be done with adaxes? Thnx Remco

asked Jan 10, 2014 by RTiel (780 points)
0 votes
1 answer

Is there a way to deprovision both a user and their computer account in 1 command? It looks like you can either do a user or computer but not both unless you use a ... like to disable the user and move the object and disable their computer and move the object

asked Aug 20, 2019 by Derek.Axe (440 points)
2,740 questions
2,474 answers
6,475 comments
1,374,896 users