Powered By Blogger

Jul 21, 2012


PowerShell - Various Tasks


In this blog post I'm presenting some of the tasks which you can experiment using PowerShell.


  • Write on the screen: You can use ' Write-Host' to write the Output on the screen and use                 ' -foregroundcolor ' to add a color to the text


  • Get input from the user: You can use ' Read-Host ' to get an input text from the user


  • Sleep: You can use ' Start-Sleep ' to display a certain text after some time. This takes seconds by default



  • Retrieve the date : Use ' (get-date) ' to get the current date and time




  • Get a list of directories: You can simply use ' dir ' to list the directories 





No comments:

Post a Comment