User Tools

Site Tools


o365:pshellconnect

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
o365:pshellconnect [2014/03/28 11:49] gfsadministratoro365:pshellconnect [2014/04/09 18:45] gfsadministrator
Line 1: Line 1:
-[[:o365|<-- torna a Office 365]]+>{{:o365:office365-banner.png?nolink&200|}} 
 +>[[:o365|<-- torna a Office 365]]
  
 ====== Connessione alla PowerShell ====== ====== Connessione alla PowerShell ======
 +Questo codice farà comparire il popup di richiesta password per l'accesso alla console Exchange, l'utente è pre-dichiarato tramite il "-Credential utente@dominio.tld", come spiegato nell'articolo del blog all'indirizzo [[http://gioxx.org/2014/03/31/office-365-connessione-alla-powershell/|gioxx.org/2014/03/31/office-365-connessione-alla-powershell]]
  
 <file ps PShell-Start.ps1> <file ps PShell-Start.ps1>
 $UserCredential = Get-Credential -Credential utente@dominio.tld $UserCredential = Get-Credential -Credential utente@dominio.tld
 $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $UserCredential -Authentication Basic -AllowRedirection $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $UserCredential -Authentication Basic -AllowRedirection
 +Import-PSSession $Session
 +</file>
 +
 +====== Connessione alla PowerShell con un file password ======
 +Questo codice farà si autenticherà alla console Exchange senza l'intervento dell'utete, utilizzando un file password precedentemente criptato, come spiegato nell'articolo del blog all'indirizzo # (in arrivo)
 +
 +<file ps PShell-Start.ps1>
 +$User = "utente@dominio.tld"
 +$PWord = Get-Content C:\pshell\password.txt | ConvertTo-SecureString
 +$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord
 +$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Credential -Authentication Basic -AllowRedirection
 Import-PSSession $Session Import-PSSession $Session
 </file> </file>
o365/pshellconnect.txt · Last modified: 2014/04/14 09:34 by gfsadministrator