Readme.txt

 
How to publish the module
    - let's say you have the module installed here
        D:\UserData\z0012stm\Documents\WindowsPowerShell\Modules\CmxModule\1.8
         
        which is the official powershell installation folder for the current user. And you have some changes done to it, so you want to publish the next version "1.9".
    - increment the Version in the psd1 file to "1.9"
    - rename the parent folder of this readme file to "1.9"
    - run the "PublishToGallery.ps1" script. The module is now published to the powershell gallery. The module can be found at the gallery as a nuget package.
    Hint: The powershell gallery should be registered by default, so if you run
    > Get-PsRepository
    you should see the "PSGallery" and its source location url.
     
    - now rename the parent folder of this readme file to "old"
    - then call the "install.ps1" file
    - the module is installed from the gallery
    - you should see the a folder "1.9" next to the "old" folder which has the new version. This folder contains the new module.
     
See which module is currently published on the PsGallery
    - In powershell, just run:
    > Find-Module CmxModule
    This should return version, name and repository of the CmxModule. If "Repository = PSGallery" you know that the module is available in the PsGallery.
     
    - Alternatively you could login to the PsGallery
    - Go to url "https://www.powershellgallery.com"
    - Sign in. Use the "work" account "tobias.goeckel@siemens.com"
    - In the search box "Search PowerShell packages" enter "CmxModule"
    - This should display the module and detailed information.
     
See which module version is currently install on the local machine
    - Run this command:
    > Get-Module CmxModule -ListAvailable
    This should return version and name of the module currently installed.
     
See which module version is currently imported into the powershell session
    - Run this command:
    > Get-Module CmxModule
    This should return version and name of the module currently imported into the running powershell session.
     
Import the module into the powershell session
    Usually a module is auto-loaded into the session as soon as it is used, i.e. one of its functions is called. Nevertheless it is possible to explicitly load the module. To do this, run the following command:
    > Import-Module CmxModule -Force
     
How to get the module from the PsGallery
    Open PowerShell with Admin rights and check if NuGet is installed
    > Get-PackageProvider -Name NuGet
    You should see the name "NuGet" and the current version.
    Hint: version 3.1.0.0 or higher needed
     
    If not installed, install it
    > Install-PackageProvider -Name NuGet -Force
 
    Check if PowerShellGet is installed
    > Get-Module PowerShellGet -ListAvailable
 
    If not installed, install it
    > Install-Module -Name PowerShellGet -Force -AllowClobber
    Hint: version 2.2.5 or higher needed