How to save my powershell commands
i've created simple command in powershell , need way of saving in useful location. add text document. wondering if had useful, or more elegant, ideas on how save these?
maybe create function or , load in profile, not sure. there has better way typing out command each time, or copying , pasting notepad
adding functions profile excellent way stash re-used code. read through get-help about_functions, create , test function of saved code, using ise. when it's working want, run
notepad $profile
from command prompt, , copy , paste profile , save it.
if want start using immediatly, run
.$profile
in current session, , reload profile (you'll errors trying recreate aliases or functions created, can ignore those).
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Windows Server > Windows PowerShell
Comments
Post a Comment