While writing a powershell script, code inside a function doesn’t update until I run the script twice?

Like the title says, I am having an issue both in Powershell ISE and VS2013 where code I write inside a function doesn’t update until I run the script twice. Here is sample code that reproduces the issue:

Write-Output "Updates"; Test; Function Test{ Write-Output "Doesn't Update"; } 

If you change the text in both the Write-Output commands, only the one outside the function updates on the first run.

Any suggestions on why this is happening?

submitted by /u/d3vourm3nt
[link] [comments]

Leave a Reply