create connect-server type powershell cmdlet
we use product called papercut handle printing students , staff, , i'm wanting create powershell module contains cmdlets map functions exposed api. these cmdlets require server connection in order work, object contains name of server connect to, port it's listening on, , authentication token string. i'd have this connect-pcutserver -server pcut -port 9191 -authtoken blahblahblah once connected subsequent cmdlets add-printer, rename-user , on able take advantage of connection. if writing in powershell instead of c# store $global:variable or similar. functions check see if $global:variable existed, if things, if not prompt user run connect-server cmdlet. i can create cmdlet called connect-server, accepts 3 params, proper way of doing return $global:object (is possible), or there a better way handle this? thanks, jeffrey s. patton jeffrey s. patton systems specialist, enterprise systems university of kansas 1001 sunnyside ave. lawrence, ks. 66045 (785) 864-02...