rgel / PowerCLi

VMware PowerCLI scripts and modules

Home Page:https://ps1code.com/category/vmware-powercli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem Importing

Cicciuzz opened this issue · comments

Referring to issue #5.
I tried to download at home, on a different computer on ubuntu and copy on windows.
Still the same problem.
Not able to import.

What i do wrong?

Send me PM to rgel75@gmail.com, I will reply you the .psm1 file.

Thanks for your file.
Solved some issues, but still the import process is not complete.

My powershell version is:
Major Minor Build Revision


5 1 16299 251

Here below the error:
'C:\Users\ftremamunno\Documents\WindowsPowerShell\Modules\Vi-Module\Vi-Module.psm1'.
In C:\Users\ftremamunno\Documents\WindowsPowerShell\Modules\Vi-Module\Vi-Module.psm1:41 car:30

  • [pscustomobject[]] GetVlan ([ValidateRange(1, 4094)][int[]]$VlanI ...
    
  •                             ~~~~~~~~~~~~~~~~~~~~~~~~
    

Attributo 'ValidateRange' non valido in questa dichiarazione. È valido solo nelle dichiarazioni 'Property, Field'.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : AttributeNotAllowedOnDeclaration

Import-Module : Impossibile elaborare il modulo 'Vi-Module' elencato nel campo 'ModuleToProcess/RootModule' del
manifesto del modulo 'C:\Users\ftremamunno\Documents\WindowsPowerShell\Modules\Vi-Module\Vi-Module.psd1'. Non sono
stati trovati moduli validi in alcuna directory di moduli.
In riga:1 car:1

  • Import-Module Vi-Module -Force -Verbose
  •   + CategoryInfo          : ResourceUnavailable: (Vi-Module:String) [Import-Module], PSInvalidOperationException
      + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand