I have written a sample program that will write Hello World and created NSIS file and executed which works fine for me
Hello World
NSIS
My .nsi script goes as follows
.nsi
Which is printing the write host as per written when I executed it. My code in .ps1 file
.ps1