Questions tagged [powershell-module]

Powershell Modules are sets of related Windows PowerShell functionalities that can be dynamic or persist on disk. Modules can contain cmdlets, providers, functions, variables, aliases and PowerShell drives.

A Powershell Module is a set of related Windows PowerShell functionalities that can be dynamic or persist on disk. Modules that persist on disk are referenced, loaded, and persisted as script modules, binary modules, or manifest modules.

Related Cmdlets

  • ImportSystemModules
  • New-Module
  • Import-Module
  • Export-ModuleMember
  • Get-Module
  • Remove-Module
  • New-ModuleManifest
  • Test-ModuleManifest
203 questions
0
votes
1 answer

Capture Verbose out from Powershell function

I am attempting to call a Powershell function from another Powershell function. The function I am calling has a lot of verbose output and I need to capture them to a file. Since I am calling said function multiple times, I need the verbose outputs…
Rohit Mitra
  • 162
  • 4
  • 13
0
votes
1 answer

Relative path references in PSModulePath PowerShell 4.0

The following technique has worked successfully for PowerShell v2 & 3. $env:PSModulePath += ';.\Modules' This has allowed a Modules folder to be distributed with scripts without having to explain to the end user how to install PowerShell Modules. As…
beavel
  • 1,077
  • 1
  • 8
  • 16
0
votes
2 answers

Change output colour in Powershell script

I want to modify my ActiveDirectory lookup script to output a certain result in color. The Script Imports the AD module and then prompts you to enter a username and see certain properties such as Name, E-mail Address and Employee ID. There are a…
James P
  • 3
  • 1
  • 2
  • 4
0
votes
2 answers

Powshell Binary Module

I have a powershell module with a base class that derives from cmdlet and all of my cmdlets derive from that. Import-module cannot see any of my classes that indirectly derive from cmdlet. Do I need to add a manifest to support this structure.
rerun
  • 25,014
  • 6
  • 48
  • 78
0
votes
2 answers

Call a specific version of PowerShell from C#

I'm trying to use the Get-VM Cmdlet called from C# on a Hyper-V host. Obviously, the according PowerShell module Hyper-V has to be imported first. The import fails, however - apparently because the module is supported only on PowerShell 3.0 (at…
-1
votes
1 answer

How do you create namespaced or sub-modules in PowerShell?

I'm familiar with writing custom PowerShell modules using the following folder structure: Modules | +-- WebUtils | | +-- WebUtils.psm1 | +-- BuildUtils | | +-- BuildUtils.psm1 Where you might import the webutils module by doing something like…
Efie
  • 1,430
  • 2
  • 14
  • 34
-2
votes
0 answers

add all powershell functions or powershell .psm1 script as a module

I have created testPowershellModule.psm1 file where there are two functions are written below function addValue { [Cmdletbinding()] param ( [String]$instanceNames = $(throw "addValue : -Value is required.") ) …
Money Times
  • 135
  • 9
-2
votes
1 answer

Import-Excel only data without header in string - PowerShell

I have installed Import-Excel Module for PowerShell by dfinke which has a great functionality but I'm facing some troubles with the headers. I would like to insert only the text into a string array, but instead, it comes with the header even when…
fdroid
  • 13
  • 1
  • 6
1 2 3
13
14