Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Silly newbie question

$
0
0
Hello,I am just starting to work with PowerShell, and have the most basic problem that I am sure is due to my misunderstanding something very fundamental. Let's say I create a simple, 1-line script that consists of: Write-Host "Hello". I can invoke the script from the PowerShell command line and it displays "Hello" just as you would expect. I next tried to place the same one line within a function, as: Function Test-Hello { Write-Host "Hello" }Nothing I do can get this command to display anything. I don't get any error, but it simply returns to the command line with no output displayed. I must be missing something really simple, but I can't figure out what it is. Please help!Thanks!

Viewing all articles
Browse latest Browse all 467

Latest Images

Trending Articles



Latest Images