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 (18k 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'm trying to generate a custom report based off the return values of a PowerShell script. I've tried looking over the tutorial docs and SDK, but I can't seem to piece it all ... Expression = { $_.Properties[1].Value } } } catch { Throw $_.Exception } } }

asked Sep 6 by joshua.lapchuk (50 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, 2020 by Derek.Axe (400 points)
2,575 questions
2,318 answers
6,176 comments
769,325 users