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 (250 points)

1 Answer

0 votes
by (19k 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 (280 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 (7k 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 (2.7k points)
0 votes
1 answer

$property = "mail" # TODO: modify me #$regex = "^[a-zA-Z0-9_.%%\-\+]+@([a-zA-Z0-9_\-]+\.)+[a-zA-Z0-9_\-]+$" # TODO: modify ... regular expression: $regex") # TODO: modify me #} # Update property value $Context.SetModifiedPropertyValue($property, $value)

asked Feb 25 by Derek.Axe (1.3k points)
0 votes
1 answer

I am using external powershell scripts where adaxes custom attributes are used as inputs. I want to clear/modify those attributes after my external ps1 script gets executed ... the same inside my external scripts thru try{}catch{} error handling method?

asked Mar 19, 2016 by Brajesh (2.5k points)
2,245 questions
2,007 answers
5,494 comments
19,929 users