.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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -