Friday, 27 February 2015

# Create WindowsPowerShell directory for currently logged user.
New-Item $env:USERPROFILE\Documents\WindowsPowerShell\ -Type Directory

#Create PowerShell profile for currently logged user.
New-Item $env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -Type File

#Import SCCM PowerShell module for for currently logged user.
Add-Content -Value "Import-Module '$($Env:SMS_ADMIN_UI_PATH | Split-Path -Parent)\ConfigurationManager.psd1'" -Path $Profile

#Set the SCCM site location for currently logged user.
Add-Content -Value "Set-Location MB1:" -Path $Profile


Format My Source Code for Blogging http://formatmysourcecode.blogspot.co.uk/

No comments:

Post a Comment