Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


dsjere
2013-04-23T16:18:01Z
Hello.

I installed a snapin for Active Roles Management Shell.

I can use it in the "Windows powershell modules".
I cannot use it from the "active Directory Module for windows powershell".
I cannot use it from Visualcron Powershell task.

I get the same error in both cases so my guess is that Visualcron uses the "active Directory Module for windows powershell".
Is it possible to run Visualcron powershell task with "Windows Powershell Module"?

Regards

/Jesse
Sponsor
Forum information
dsjere
2013-04-24T12:41:07Z
Hi again.

Correction.

How do I add a powershell snapin so that Visualcron can use it?

Regards

/Jesse
Support
2013-04-24T14:13:53Z
Could you make a reproducable script, with add in and instructions how you add it so we can easily reproduce it here?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2013-04-24T14:41:37Z
If I'm understanding correctly what the OP is asking.... It sounds like they use the Quest ActiveRoles Management for AD. If you open PowerShell normally, you will not be able to use the Quest cmdlets for AD until you've loaded the 'Snapin'.

The shortcut for launching the Quest ActiveRoles Management Shell (Powershell with Quest Snapins) makes the snapins (cmdlets) available for usage automatically. The normal Powershell shortcut does not, and subsequently neither will VisualCron.

What you do, likely in the first line in your script, is add the snappin with the following PowerShell command:

Add-PSSnapin "snapin name"

In the case of the Quest AD stuff, it would be this:

Add-PSSNapin Quest.ActiveRoles.ADManagement

If you want a list of available SnapIns, you can use this command to find registered Snapins:

Get-PSSnapin -registered

To see a list of Snapins that are actually LOADED, just type:

Get-PSSnapin


I don't know if this is something that VisualCron itself should get into or not. Its something that maybe couuld be configured as part of some sort of Global powershell options maybe and called when a powershell task is being ran. However, I know there is a profile 'file' for powershell that you can configure per user to automatically load snapins or modules every time you launch powershell, but that's likely something the User would have to do as its a 3rd-party tie-in.

That being said, I fully believe the best method is to have references to any snapins or required modules directly in your scripts.

As far as the Server 2008 (and likely 2012) microsoft built-in AD cmdlets, its not a snapin, its a Module.

You would do the following, assuming you have the PowerShell for AD feature installed in Windows.

Import-Module ActiveDirectory

In order to know thats what you need to type (name of module), you can list the available modules by using this command:

Get-Module -ListAvailable

Hopefully this helps.

Brian
dsjere
2013-04-24T14:59:46Z
Thank you Brian.

You pinned it. It works perfectly.

Best regards

/Jesse
bbusse
2013-04-24T15:01:31Z
Originally Posted by: dsjere 

Thank you Brian.

You pinned it. It works perfectly.

Best regards

/Jesse



Excellent. Happy to help!

Brian
(PowerShell Junkie... haha)

Guest
2021-07-20T10:35:51Z
I am having also this issue How do I use a PowerShell script built using the Windows Active Directory module as an Active Roles Server Script Module? I am trying this I am getting an error that "GEt-ADGroupMember" is not recognized. I think this is because it does not recognize the cmdlet without the ActiveDirectory module.
Support
2021-07-28T14:11:45Z
Originally Posted by: jack austin 

I am having also this issue How do I use a PowerShell script built using the Windows Active Directory module as an Active Roles Server Script Module? I am trying this I am getting an error that "GEt-ADGroupMember" is not recognized. I think this is because it does not recognize the cmdlet without the ActiveDirectory module.



Please send us an email to support@visualcron.com with details
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top