Questions tagged [pssnapin]

PowerShell snap-ins provides a mechanism for registering sets of cmdlets and another Windows PowerShell provider with the shell. May also refer to the PSSnapIn base class.

A Windows PowerShell snap-in provides a mechanism for registering sets of cmdlets and another Windows PowerShell provider with the shell, thus extending the functionality of the shell. A Windows PowerShell snap-in can register all the cmdlets and providers in a single assembly, or it can register a specific list of cmdlets and providers.

All Windows PowerShell snap-in classes derive from the PSSnapIn or CustomPSSnapIn classes.

Related Cmdlets

  • Add-PSSnapin
  • Remove-PSSnapin
  • Get-PSSnapin
45 questions
0
votes
1 answer

Powershell SnapIn when running in Visual Studio publish

I'm trying to run a powershell script when doing a file system publish for my project in Visual Studio, but snap-ins don't seem to be working when actually running the publish. If I run the powershell script manually outside of visual studio the…
SikhWarrior
  • 947
  • 3
  • 18
  • 33
0
votes
1 answer

Exchange Management Tool Installation Error

My goal is to create Email forwarding for 15k+ accounts in our Office365 by using powershell. I may have to add that i don't have an education in this field and might describe things in a not very technical terms. The problem i encountered is that i…
0
votes
1 answer

Register Powershell SnapIn to specific version of Powershell

I am trying to run an Exchange Management Shell script via managed code. Our PowerShell version is version 4. I am trying to use the runspaceConfiguration.AddPSSnapin() method to add the exchange SnapIn…
Adamski343
  • 39
  • 9
0
votes
0 answers

Powershell Backup snap-in in win7

In Windows 7 32 bit machine I am trying to work with Powershell CMDETS for Backup and restore. I downloaded iis7.psprov_x86.msi but it says that "Powershell snap in is part of windows operating system." When I go and see the Turn windows feature on…
0
votes
1 answer

Use import-module with a PowerShell PSSnapin Dll

We have a legacy PowerShell PsSnapin (c#). I want to avoid having to use InstallUtil. The following imports a module with the PSSnapin cmdlets exported: import-module .\MySnapin.dll However, when I run the module cmdlets, they fail due to not being…
Rob
  • 4,015
  • 4
  • 27
  • 48
0
votes
2 answers

Cmdlet Contention between PowerShell SnapIns

I ran into an issue while using both the Vmware PowerCLI and System Center Virtual Machine Manager snap-ins for PowerShell. They both contain similarly named cmdlets, like 'Get-VM' and 'Get-VMHost'. It appears that the last snap-in to load wins,…
0
votes
1 answer

Trying to compile VS2008 project on Win 64 bit which is custom Powershell PSSnapin

Library Project compiles fine for ANY CPU in VS2008 running on Win 7 64 -bit. Now in the post build following command fails when attemptiong to register library dll: PS C:\Windows\Microsoft.NET\Framework64\v2.0.50727> .\installutil …
0
votes
1 answer

Import Binary Modules in Powershell 3 with dll references located in different folder

I am converting a powershell snapin(which was working really fine) to a powershell module. I have added the output dll to a folder with the same name as the dll and added the Module path to the $env:PSModulePath The import seems to fail because the…
Pinte Dani
  • 1,591
  • 2
  • 22
  • 31
0
votes
1 answer

"no snap ins have been registered for powershell 4"

I have a Windows Server 2012 R2 Standard enabled with ADFS. I can open and use ADFS Management console. I am not sure which version of ADFS is installed on the server. As per Microsoft blogs Windows Server 2012 R2 comes with ADFS 2.0. I donot know…
0
votes
2 answers

Use BAT file to check if PSSnapin is registered

I've hit a little bit of a brick wall here. I have written a rather large PS script that requires the SQLServerProviderSnapin100 and this all works happily. To run the script I have written a BAT file for the users to run so that they won't have to…
0
votes
1 answer

System.Management.Automation.PSArgumentException

I have a problem running a PowerShell Script from my C# Code. The script contains functions from the PowerShell Snapin VMWare.View.Broker. I do that in the following way: PSSnapInException psEx; RunspaceConfiguration runConfig =…
andreaspfr
  • 2,176
  • 5
  • 38
  • 49
0
votes
0 answers

How to run my custom cmdlet with elevated privilege?

I'm a beginner to powershell. I have a custom cmdlet I created. This code will break at the last line: RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); PSSnapInException psEx =…
user1019042
  • 2,276
  • 8
  • 36
  • 75
0
votes
1 answer

Running Powershell scripts for Exchange in web services

I am trying to run some Powershell scripts for Microsoft Exchange in web services. The code written below works fine when run from a console application but when I move it into a web services project and call the web method, it errors when it calls…
Kelly
  • 835
  • 1
  • 15
  • 29
0
votes
2 answers

PowerShell Modules and SnapIns

I've created several utility modules that all depend upon the Microsoft.SharePoint.PowerShell snapIn. When run on my machine the scripts all run correctly, I don't have any modules or snapins in my profile for powershell to "default load", however…
Peter
  • 1,698
  • 12
  • 20
0
votes
1 answer

Setting up 1-click Install for custom Powershell provider

I've created a custom Powershell provider. However, currently there are a few steps people have to do to get it working on a user's computer: configure Powershell to run against .Net 4 (add a config file in…
zidsal
  • 557
  • 7
  • 30
1 2
3