header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Changing user preferences within (VB) cmdlet
Last Post 24 Oct 2009 11:32 PM by Archdeacon. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ArchdeaconUser is Offline
New Member
New Member
Posts:5
Avatar

--
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)User is Offline
    Veteran Member
    Veteran Member
    Posts:1642
    Avatar

    --
    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
    ArchdeaconUser is Offline
    New Member
    New Member
    Posts:5
    Avatar

    --
    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.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer