プロジェクト

全般

プロフィール

Connect365.txt

蒲池 晃, 2019/05/07 06:45

 
1
-- スクリプトの実行を可能にする
2
Set-ExecutionPolicy RemoteSigned
3

    
4
--接続
5
$UserCredential = Get-Credential
6
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
7
Import-PSSession $Session
8

    
9
--切断
10
Remove-PSSession $Session