GithubHelp home page GithubHelp logo

it-praktyk / exchangeadminsprofiles Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 25 KB

PowerShell profiles with settings helpfull for Exchange Server admins

License: GNU General Public License v3.0

PowerShell 100.00%

exchangeadminsprofiles's Introduction

ExchangeAdminsProfiles

PowerShell profiles with settings helpfull for Exchange servers adminstrators

Included settings

  • console resizing and color standarization
  • additional PSDrive 'Desktop:' which pointing to Desktop
  • additional PSDrive 'Scripts:' which pointing to MyDocuments\Scripts - if the folder exist
  • switching off the certificates revocation list (the same as in Internet Explorer -> Options -> Advanced ) - it is specially helpfully for Exchange Servers which don't have access to the internet - Exchange Management Shell is starting faster
  • display file extensions for known file format
  • adding default parameters settings to the variable PSDefaultParameterValues - for Export-CSV e.g.

More about PowerShell profiles

  • get-help about_Profiles

  • https://technet.microsoft.com/en-us/library/hh847857.aspx

    Copy text from this file to the PowerShell profile file (create it if doesn't exist)

    • for you only: C:<YOUR_PROFILE_DIRECTORY>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 - value for the variable $Profile.CurrentUserCurrentHost
    • for all users on computer: C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1 - value for the variable $Profile.AllUsersCurrentHost

EXAMPLES

EXAMPLE 1

    You can check path for the profiles examining the $profile variable

    [PS] > $Profile | Format-List -Force

    AllUsersAllHosts       : C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
    AllUsersCurrentHost    : C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1
    CurrentUserAllHosts    : C:\Users\Username\Documents\WindowsPowerShell\profile.ps1
    CurrentUserCurrentHost : C:\Users\UserName\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
    Length                 : 76

EXAMPLE 2

You can examine if the profile file exist if and create empty one a a profile file if not exist

[PS] > If (!(Test-Path -Path $Profile)) { New-Item -Path $Profile -ItemType File -Force }

        Directory: C:\Users\Wojtek\Documents\WindowsPowerShell


        Mode                LastWriteTime         Length Name
        ----                -------------         ------ ----
        -a----        1/22/2016  12:01 AM              0 Microsoft.PowerShell_profile.ps1

The empty file will be created which will be used as a profile for the current user only.

For all users use the variable $Profile.AllUsersAllHosts instead $Profile .

AUTHOR

Wojciech Sciesinski, wojciech[at]sciesinski[dot]net

KEYWORDS

PowerShell, Exchange, Profiles

VERSIONS HISTORY

- 0.1.0 - 2015-03-08 - The first version publishid on GitHub
- 0.2.0 - 2015-03-18 - console and buffer resizing corrected, verifying if known file extensions are displayed new PSDrive Scripts added
- 0.3.0 - 2015-12-10 - Clear variables set temporary in profile, Set default parameters for Export-CSV cmdlet
- 0.3.1 - 2015-12-22 - Assigning default parameters corrected, background colors for console corrected
- 0.3.2 - 2016-01-14 - Corrected mistake in the variable usage, added removing existing PsDrives, rewrote set PSDefaultParameterValues
- 0.3.3 - 2016-01-21 - Removing temporary variables corrected
- 0.4.0 - 2016-01-21 - The file reformated, help updated
- 0.5.0 - 2016-01-25 - Set registry rewrote, set PSDefaultParameterValues corrected
- 0.6.0 - 2016-01-26 - Set PSDrive rewrote
- 0.6.1 - 2016-01-27 - Help updated

DISCLAIMER

This script is provided AS IS without warranty of any kind. I disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall I be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the script or documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.