Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
PowerShell Development
>
Cmdlet Development
Changing user preferences within (VB) cmdlet
Last Post 24 Oct 2009 11:32 PM by
Archdeacon
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Archdeacon
New Member
Posts:5
24 Oct 2009 05:16 AM
I have writen a PSSnapin in Visual Basic but can find no information on the
following points:
1. How can the variables VerbosePreference and DebugPreference be changed during runtime?
2. How can the settings from PSCmdlet.vb be accessed from the console? (Using Get-PsSnapin MyDll only returns Name,Description & PSVersion).
3. How can one Exit the cmdlet at any point (without throwing an exception)?
4. What needs to be done to make Get-Help Get-MyCmdlet to work?
5. How can I access the equivalant of PowerShell MyInvocation.MyCommand during runtime, ie the commandline the user entered?
Any advice please?
Retired computer operator/programmer from Rutherford High Energy Lab (UK), European Space Agency and Amadeus Global Ticketing (Germany). Now dabble with PCs only, using Windows, VBscript, Visual Basic and PowerShell. An assortment of utilities is available on the web site at www.SeaStarDevelopment.Bravehost.com for free download. Started working on computers in 1969 on the IBM mainframe 360/75 which was later upgraded to System 360/195 (the largest computer in Europe at that time) and had access to the Bitnet, or ArpaNet (American Research Project Association), which has now become the Internet.
Marco Shaw (MVP)
Veteran Member
Posts:1642
24 Oct 2009 06:41 AM
I'm short on time right now. As for #4, you may want to check this:
http://blogs.msdn.com/powershell/ar...-tool.aspx
The format required for creating a help file isn't documented AFAIK...
Marco
*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*Blog - http://marcoshaw.blogspot.com
Archdeacon
New Member
Posts:5
24 Oct 2009 11:32 PM
Many thanks for the prompt reply on that one. I will check it out.
Retired computer operator/programmer from Rutherford High Energy Lab (UK), European Space Agency and Amadeus Global Ticketing (Germany). Now dabble with PCs only, using Windows, VBscript, Visual Basic and PowerShell. An assortment of utilities is available on the web site at www.SeaStarDevelopment.Bravehost.com for free download. Started working on computers in 1969 on the IBM mainframe 360/75 which was later upgraded to System 360/195 (the largest computer in Europe at that time) and had access to the Bitnet, or ArpaNet (American Research Project Association), which has now become the Internet.
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
PowerShell Development
>
Cmdlet Development
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2