Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Function to update the powershellprofile from the internet
- function Update-PowerShellProfile() {
- [CmdletBinding()]
- Param()
- Write-Verbose "Updating PowerShell profile"
- if(!(Test-Path (Split-Path $profile))) {
- Write-Verbose ("Profile path did not exist, creating {0}" -f (Split-Path $profile))
- mkdir (Split-Path $profile)
- }
- Write-Debug "Creating System.Net.WebClient"
- $wc = New-Object System.Net.WebClient
- Write-Debug "Downloading file http://pastebin.com/raw.php?i=tdySrDgz"
- $wc.DownloadFile("http://pastebin.com/raw.php?i=tdySrDgz", $profile)
- Write-Output "Reload profile with the cmdlet: . `$profile"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement