.net - How can I make a PSDrive created within a function accessible out of this function? -
i assume creating new ps-drive within function makes drive accessible within function.
how can make ps-drive created calling function main accessible out of function?
$temprorarypsdrivename = "temprorarydrive" create-psdriveby $temprorarypsdrivename #private function creates psdrive based on logic dir $($temprorarypsdrivename + ":") #this not work 'teprorarydrive' not #accessible once exit create-psdriveby function
give global scope psdrive:
new-psdrive -name qq -psprovider filesystem -root c:\windows -scope global
Comments
Post a Comment