Error: "FoundationCoreAndTiBUsage.psm1 was not loaded because no valid module file was found in any module directory"
search cancel

Error: "FoundationCoreAndTiBUsage.psm1 was not loaded because no valid module file was found in any module directory"

book

Article ID: 313903

calendar_today

Updated On: 04-11-2025

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • The PowerCLI script module FoundationCoreAndTiBUsage.psm1 is needed to run per KB Counting Cores for vSphere Foundation and VMware Cloud Foundation and TiBs for vSAN Add-on.

  • When trying to run the command "Import-Module .\FoundationCoreAndTiBUsage.psm1", the following error message appears:

    Import-Module : The specified module '.\FoundationCoreAndTiBUsage.psm1' was not loaded because no valid module file was found in any module directory.
    At line:1 char:1
    + Import-Module .\FoundationCoreAndTiBUsage.psm1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ResourceUnavailable: (.\FoundationCoreAndTiBUsage.psm1:String) [Import-Module], FileNotFoundException
        + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Environment

VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x

Cause

The module is not preloaded in the vSphere PowerCLI bundle and needs to be added manually.

Resolution

  1. Download the PowerCLI Script Module FoundationCoreAndTiBUsage.psm1 from the attachment section of KB Counting Cores for VMware Cloud Foundation and vSphere Foundation and TiBs for vSAN.

  2. Run the Import-Module command while adjusting the path for where the module is downloaded.

    Example

    Import-Module C:\FoundationCoreAndTiBUsage.psm1

Attachments

FoundationCoreAndTiBUsage get_app