Does not recognize ActiveDirectory module objects

Support for all customers who have purchased a PowerShell HelpWriter product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
mpalmer
Posts: 10
Joined: Mon Nov 07, 2016 2:59 pm

Does not recognize ActiveDirectory module objects

Post by mpalmer » Fri Nov 25, 2016 2:31 pm

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 3438 times
pshw_popup2.png
pshw_popup2.png (19.58 KiB) Viewed 3438 times

User avatar
davidc
Posts: 4903
Joined: Thu Aug 18, 2011 4:56 am

Re: Does not recognize ActiveDirectory module objects

Post by davidc » Mon Nov 28, 2016 9:50 am

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: Does not recognize ActiveDirectory module objects

Post by juneblender » Mon Nov 28, 2016 12:53 pm

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
Joined: Mon Nov 07, 2016 2:59 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer » Mon Nov 28, 2016 1:37 pm

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: Does not recognize ActiveDirectory module objects

Post by juneblender » Mon Nov 28, 2016 2:07 pm

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
Joined: Mon Nov 07, 2016 2:59 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer » Mon Nov 28, 2016 2:13 pm

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: Does not recognize ActiveDirectory module objects

Post by juneblender » Tue Nov 29, 2016 10:30 am

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
Joined: Mon Nov 07, 2016 2:59 pm

Re: Does not recognize ActiveDirectory module objects

Post by mpalmer » Tue Nov 29, 2016 11:19 am

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: Does not recognize ActiveDirectory module objects

Post by juneblender » Tue Nov 29, 2016 11:25 am

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
Joined: Thu Jul 24, 2014 3:26 pm

Re: Does not recognize ActiveDirectory module objects

Post by juneblender » Tue Nov 29, 2016 12:08 pm

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?