|
Guy recommends: This CG will put you in charge of controlling changes to network routers and other SNMP devices. Download your free Config Generator |
PowerShell Scripting - Profile.ps1Introduction to PowerShell's Profile.ps1DOS old timers may remember AutoExec.bat and Config.sys. More modern Microsoft operating systems need boot.ini; all these files control the startup environment. Well the purpose of this page is to configure the equivalent PowerShell file: profile.ps1. PowerShell Profile.ps1 Topics
♣ Setting up PowerShell's Profile.ps1Profile.ps1 location C:\Documents and Settings\All
Users\Documents\PSConfiguration\profiles.ps1 Registry Setting for Scripts e.g. Profile.ps1 Change the REG_SZ ExecutionPolicy from Restricted to UNRestricted or RemoteSigned (RemoteSigned as the name suggests, means that scripts from the internet must have digital certificates, however scripts on the localhost run without restriction.) For more details of setting up profile.ps1 in the \PSConfiguration folder see here.
˚
Customising Profile.ps1The principle behind profile.ps1 and other cmdlets with a msh extension is to save keystrokes into a file for reuse later. Once you have absorbed the concept then you can truly customize your profile.ps1, merely look at examples for ideas and then adapt the most promising to set your PowerShell environment. Working Directory. Aliases set-alias xcopy
Guy
Recommends: A Free tool from SolarWinds: Config Generator
|
||||
|
|
|
|
Home Copyright © 1999-2010 Computer Performance LTD All rights reserved Please report a broken link, or an error. | |