0 votes

Hey guys,

First time Adaxes user, and let me say, we absolutely love the product! Quick question though....

As a part of our account de-provisioning process, we need to delete a few folders from various network shares that belong to users (not technically their AD home drive, but similar concept (eg. terminal server profiles for each user)). I have a simple custom command that runs a simple powershell script using Remove-Item. However, when I run it, it just errors out with 'Cannot invoke this function because the current host does not implement it'. I find this odd, seeing as New-Item commands work just fine. Adaxes is running on a Server08R2 SP1 VM.

My script looks like this:

Remove-Item \\server01\share1$\%username% -Force

The same script with New-Item (to create the folder) works just fine. I can run the exact same code in a regular powershell window with no problem.

Any thoughts? Any alternatives?

by (20 points)

1 Answer

0 votes
by (18.0k points)

Hello,

Try this:

Remove-Item \\server01\share1$\%username% -Force -Confirm:$False
0

Tried it, same error (can't invoke).

0

Please post the error message you get.

0

"Cannot invoke this function because the current host does not implement it." when I run the PS command against a test account in Adaxes.

0

Hello,

Please, post a screenshot of your script.

0

Here it is:

0

If the folder you are trying to delete contains files or subfolders, you also need to use the -Recurse parameter:

Remove-Item \\server01\share1$\%username% -Force -Confirm:$False -Recurse
0

Looks like that did it! Thanks for all your help!

Related questions

0 votes
1 answer

I found these codes: http://www.adaxes.com/sdk/SampleScripts ... lFlow.html I created custom command(action is "run powershell script") with the following codes and added ... host does not implement it. Can anyone help me look into this ? Really appreciate!

asked Jul 7, 2015 by tony (50 points)
0 votes
1 answer

Hi there ! I wan to implement a custom command that will remove a user from all disitribution groups : Import-Module Adaxes Get-AdmGroup -Filter { mail -like "*" } | Where { ( ... host does not implement it. I can't see what i'm doing wrong... Thanks Stephen

asked Sep 27, 2011 by sroux (800 points)
0 votes
1 answer

I wrote a small script to get Mail Queue stats on all my Exch 2010 Hub Tansport servers. It works in EMS but when I configure as a Custom Command it returns an ... $HubServer) { get-Queue -server $server -EA inquire -SortOrder -messagecount write-output "" }

asked Dec 11, 2012 by mdeflice (350 points)
0 votes
1 answer

I don't understand how you would use this searcher function. Can you show me in this example? Import-Module ImportExcel #set up variables $currentTime = Get-Date ... $Context.BindToObjectByDN($NewU) $U.Put("adm-CustomAttributeBoolean6", $False) $U.SetInfo() }

asked Dec 14, 2023 by mightycabal (1.0k points)
0 votes
1 answer

When will this function/feature be available?

asked Jun 5, 2023 by wintec01 (1.5k points)
3,548 questions
3,239 answers
8,232 comments
547,814 users