Advertisement
Guest User

1

a guest
Feb 10th, 2014
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     [CmdletBinding()]
  2.      Param(
  3.       [Parameter(Position=0,
  4.           Mandatory=$True,
  5.           ValueFromPipeline=$True)]
  6.       [string]$username,
  7.      
  8.       [Parameter(Position=1,
  9.           Mandatory=$True,
  10.           ValueFromPipeline=$True)]
  11.       [string]$password
  12.      )
  13.    
  14.     . "C:\powershell\include\automatedlogin-mso-import.ps1"
  15.    
  16.     #Adjust PS output for PHP
  17.     $pshost = Get-Host
  18.     $pswindow = $pshost.ui.rawui
  19.     $newsize = $pswindow.buffersize
  20.     $newsize.height = 3000
  21.     $newsize.width = 400
  22.     $pswindow.buffersize = $newsize
  23.    
  24.     Set-MsolUserPassword -UserPrincipalName $username -NewPassword $password -ForceChangePassword $false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement