Need to build a GUI progress bar for import-pssession

Welcome Forums General PowerShell Q&A Need to build a GUI progress bar for import-pssession

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
1 year, 4 months ago.

  • Author
    Posts
  • #72190

    Participant
    Points: 0
    Rank: Member

    Hi experts,

    I am writing a GUI tool where I'm importing an Microsoft Exchange PowerShell session using import-pssession. I want to show the progress of import in a GUI progress bar. By default import-possession uses write-progress to show progress in console, which I don't want and disabled using $ProgressPreference = 'SilentlyContinue'.

    But not getting any clue on this on how to get the progress in INT.

    Please help.

  • #72424

    Keymaster
    Points: 1
    Rank: Member

    That's hard coded functionality in Import-Module and Import-PSSession; you're not going to be able to do what you're asking.

    • #72476

      Participant
      Points: 0
      Rank: Member

      Thanks for the reply Don. But I'm wondering that how powershell_ise and sapien PowerShell studio are able to display the progress.

      I have taken the screenshot of powershell_ise but I don't know how to paste screenshot here.

  • #72494

    Keymaster
    Points: 1
    Rank: Member

    Those applications host the shell and respond to Write-Progress. You can't do that from within the shell.

The topic ‘Need to build a GUI progress bar for import-pssession’ is closed to new replies.