save the script in .ps1 format..try as below
for example vminfo.ps1
execute like this
vminfo.ps1 |export-csv -path 'c:\vminformat.csv' -notypeinformation -noclobber
save the script in .ps1 format..try as below
for example vminfo.ps1
execute like this
vminfo.ps1 |export-csv -path 'c:\vminformat.csv' -notypeinformation -noclobber