locked
Displaying message while executing PowerShell scripts !!! RRS feed

  • Question

  • Hi,

    I have a script to automate some manual work.

    I want powershell to display some message before executing a particular line of code, delay execution for few seconds and show the progress and finally a message after execution. 

    Can someone please help me with that ?

    Thursday, November 22, 2012 3:22 PM

Answers

  • Hi,

    I have a script to automate some manual work.

    I want powershell to display some message before executing a particular line of code, delay execution for few seconds and show the progress and finally a message after execution. 

    Can someone please help me with that ?

    Write-Host "somemessage" -foregroundcolor green
    Start-Sleep -seconds 30
    # continue

    ... more code


    ¯\_(ツ)_/¯

    • Proposed as answer by Bill_Stewart Thursday, November 22, 2012 7:41 PM
    • Marked as answer by Awaneendra Friday, November 23, 2012 2:35 AM
    Thursday, November 22, 2012 5:31 PM