Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Easily Create a Script that Creates PowerShell Aliases

$
0
0

Summary: Learn how to run a one-line Windows PowerShell command to create a Windows PowerShell script that automatically recreates all of your aliases.

Hey, Scripting Guy! Question I want to create a script that will create a standardized set of Windows PowerShell aliases for my environment. I need to do this in a single line. How can I easily do this?

Hey, Scripting Guy! Answer Use the Export-Alias cmdlet and specify the –As script parameter. Provide a path to store the script, as shown here.

Export-Alias -As script -Path c:\fso\aliases.ps1


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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