Q. Should I use Write-Host or Write-Output in my PowerShell?
A. If you open a PowerShell window and type the following commands the result is the same for both, it tells you hello:
PS C:\> Write-Host ("Hello " + $env:USERNAME)
Hello john
...
Q. I've updated a PowerShell module which is already loaded, how do I reload it?
A. PowerShell will not load an already loaded module however if you need to force a module to be reloaded use the -force switch when importing the module.
In my last article, I made the argument that you should stop writing batch files (Cmd.exe shell scripts) and instead focus your efforts on learning PowerShell. Of course, there is always a learning curve to new technologies, and Windows PowerSh...
Windows PowerShell should rightly be seen as a replacement for batch file scripting (Cmd.exe shell scripting), but for some reason, many people seem to be unwilling to leave batch behind. This article begins a series that’s designed to help...