Does not recognize ActiveDirectory module objects

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
mpalmer
Posts: 10
Last visit: Mon Oct 02, 2017 1:08 pm

Does not recognize ActiveDirectory module objects

Post by mpalmer »

I'm currently using a trial version of PowerShell HelpWriter version 1.1.20 x64.

I'm trying to create a new help file from an existing module and when I attempt to Export it I get an error that says unable to find type [Microsoft.ActiveDirectory.Management.ADUser]. When I click OK on that message I get another popup that is just blank (exactly the same as a previous post on here). When I click OK on the blank popup it goes away and then it just sits at the Select Module window and never completes.
pshw_popup1.png
pshw_popup1.png (20.98 KiB) Viewed 46324 times
pshw_popup2.png
pshw_popup2.png (19.58 KiB) Viewed 46324 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Does not recognize ActiveDirectory module objects

Post by davidc »

Thank you for reporting the issue. We are investigating and we will respond once we have an update.
David
SAPIEN Technologies, Inc.
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: Does not recognize ActiveDirectory module objects

Post by juneblender »

I've tried to repro this issue with ActiveDirectory 1.0.0.0 and HelpWriter 1.1.20 on Server 2016 and Windows 10 Pro with RSAT. No luck. It generates the help file for all exported commands.

Not sure which difference is causing my setup to respond differently. I can share the dll-help.xml file if that would help you.
User avatar
mpalmer
Posts: 10
Last visit: Mon Oct 02, 2017 1:08 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer »

Sorry, I'm not sure what the dll-help.xml is or how that would help me...

I could also supply you with the module to test if that would be helpful.

Thanks
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: Does not recognize ActiveDirectory module objects

Post by juneblender »

Oh, sorry! A dll-help.xml file is a PowerShell help file. I thought you were trying to create a help file for the official ActiveDirectory module. Now I realize that this is your own module.

Before I look at your module, please run this command and let me know if it runs without error:
(Get-Command -Module <ModuleName>).ParameterSets.Parameters
where <ModuleName> is the name of your module.

We'll figure this out. :)
User avatar
mpalmer
Posts: 10
Last visit: Mon Oct 02, 2017 1:08 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer »

Oh. My apologies, looking at my original post it definitely wasn't clear I was creating it for my own module.

I ran the command you supplied and it completed without any errors.
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: Does not recognize ActiveDirectory module objects

Post by juneblender »

Okay, I suspect we're missing a library somewhere. Please upload your module to: https://www.sapien.com/support/upload
User avatar
mpalmer
Posts: 10
Last visit: Mon Oct 02, 2017 1:08 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer »

I've uploaded the file. It had an error that said the file had been uploaded successfully but it wasn't able to notify support.
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: Does not recognize ActiveDirectory module objects

Post by juneblender »

I have it. It uploaded just fine despite the error, which I reported to our web master. Give me a few minutes to check.
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: Does not recognize ActiveDirectory module objects

Post by juneblender »

Thanks for uploading the module. It really helps to be looking at the same code. The zip contained only a .psm1; no module manifest (.psd1). If I'm missing content, please let me know. There are a few things that I can't test, because I don't have the Exchange and Skype modules.

I suspect that the problem is that the required modules are not being loaded. To load dependent modules, use the RequiredModules key in the module manifest. To add a module manifest, use the New-ModuleManifest cmdlet or, in PowerShell Studio, use New/New module project, which creates a module manifest for you, or New/Script and then use the ModuleManifest snippet.

When you import this module (without a .psd1 file), do the functions works as expected? In particular, does the function with the mandatory parameter of type [Microsoft.ActiveDirectory.Management.ADUser] work? Are you running PowerShell HelpWriter on the same machine with the same user account?
This topic is 7 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.