Module manifest

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Bojan Zivkovic Bojan Zivkovic 5 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37124
    Profile photo of Bojan Zivkovic
    Bojan Zivkovic
    Participant

    Hi, I have created PowerShell module (with bunch of advanced functions) and module manifest. Autoloading of my module works fine but I have problems with autoloading of other PowerShell modules downloaded from the Internet such as ADReplication module, Carbon module and PDFTools module. All these modules and mine too are located where they should be:

    %userprofile%\Documents\WindowsPowerShell\Modules

    and each of them has its own module manifest. I am not sure but I think before I created mine module manifest autoloading of downloaded modules worked fine. What is the catch here?

    #37328
    Profile photo of Don Jones
    Don Jones
    Keymaster

    What's your PSModulePath environment variable, and what's your execution policy?

    #37337
    Profile photo of Bojan Zivkovic
    Bojan Zivkovic
    Participant

    Meanwhile I deleted Tools.psd1 file.

    $env:PSModulePath -split ";" returns:

    C:\Users\admbojan.zivkovic\Documents\WindowsPowerShell\Modules
    C:\Program Files\WindowsPowerShell\Modules
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Powershell\

    Get-ExecutionPolicy returns: Unrestricted

    Also:

    PS C:\> get-module -Name pdftools,adreplication,carbon,importexportexcel,tools -ListAvailable

    Directory: C:\Users\admbojan.zivkovic\Documents\WindowsPowerShell\Modules

    ModuleType Version Name ExportedCommands
    ———- ——- —- —————-
    Script 2.0 ADReplication {Get-ADDomain, Get-ADForest, Get-ADLastChanges, Get-ADReplicationConnection...}
    Script 2.0.1 Carbon {Add-GroupMember, Add-TrustedHost, Assert-AdminPrivilege, Assert-FirewallConfigurable...}
    Script 0.0 ImportExportExcel {Import-Excel, Export-Excel}
    Script 1.0 PDFTools Out-PTSPDF
    Script 0.0 Tools {Fix-NetworkLocationAwarenessService, New-PubRegKeySSO, Add-UserToLocalAdminsGroup, Remo...

    PS C:\> Get-ChildItem -Path C:\Users\admbojan.zivkovic\Documents\WindowsPowerShell\Modules\

    Directory: C:\Users\admbojan.zivkovic\Documents\WindowsPowerShell\Modules

    Mode LastWriteTime Length Name
    —- ————- —— —-
    d—– 1/21/2016 9:07 AM ADReplication
    d—– 11/19/2015 12:55 PM Carbon
    d—– 3/31/2016 10:34 AM ImportExportExcel
    d—– 11/17/2015 1:06 PM PDFTools
    d—– 4/5/2016 12:55 AM Tools

    Autoloading of modules ADReplication, ImportExportExcel and Tools works, Carbon and PDFTools does not. When I had Tools.psd1 file problems existed too. Apart from Tools module others are downloaded and copied to ...\Modules folder

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.