Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Need help with writing comments before executing function

$
0
0

Hello all,

i have below code i need to write comment before executing function.

        [Parameter()][string]  $Backuppath= ( write-host "Enter Backuppath"Select-FolderDialog ) ,#  (read-host "Enter Backuppath"),
        [Parameter()][string]  $SQLTEMPDBDIR=( write-host "Enter Backuppath"Select-FolderDialog ) ,#(read-host  "Enter TempDir"),
        [Parameter()][string]  $SQLUSERDBDIR=( write-host "Enter Backuppath"Select-FolderDialog ) ,#(read-host  "Enter User Data Directory"),
        [Parameter()][string]  $SQLUSERDBLOGDIR=( write-host "Enter Backuppath"Select-FolderDialog ) ,#(read-host  "Enter User Log Directory"),

its not running function Select-FolderDialog its considering function as comment below is the result i am getting  when i execute

Enter Backuppath Select-FolderDialog
Enter Backuppath Select-FolderDialog
Enter Backuppath Select-FolderDialog
Enter Backuppath Select-FolderDialog

can someone help me on this 


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>