TechShizz | PowerShell Remote Administration - Implicit Remoting

PowerShell Remote Administration - Implicit Remoting

To administer Office 365 you will need the following:

 

Azure AD PowerShell

 

Prerequisites

 

  • Windows 7+ / Server 2008R2 +
  • .NET 3.51 Framework
  • All cloud services subscription updates
  • Online Services Sign-in Assistant - OS Specific - From MS Download Centre.
  • Azure Administrative Console - From MS Download Centre.

See this link : http://technet.microsoft.com/library/jj151815.aspx

Download from HERE

Connect to Office 365 to administer Users, Licenses etc. (Not Exchange)

 

$msolcred = get-credential
connect-msolservice -credential $msolcred

 

(Log in with your  user@domain.onmicrosoft.com account)

 

To Administer Exchange in Office 365

 

 

Launch Azure Module for PowerShell or import the module - Import-Module MSOnline

 

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

 

Import-PSSession $Session

 

To administer another exchange server via PowerShell remotely

 

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://mail.mydomain.com/powershell -Credential $UserCredential -Authentication Basic -AllowRedirection

 

Import-PSSession $Session

 

You may need to change the -Authentication switch to "Kerberos" depending on security settings.

 

To administer share point online

 

You need to download and install the SharePoint PowerShell module before this will work:

https://www.microsoft.com/en-gb/download/details.aspx?id=35588

 

$UserCredential = Get-Credential

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

$SP = Read-Host -Prompt 'Enter SharePoint Domain'

Connect-SPOService -Url https://$SP-admin.sharepoint.com -credential $UserCredential

 

To administer Skype for Business Online (Lync)

 

You need to download and install the Skype for Business PowerShell module before this will work:

https://www.microsoft.com/en-gb/download/details.aspx?id=39366

 

$UserCredential = Get-Credential

Import-Module SkypeOnlineConnector

$sfboSession = New-CsOnlineSession -Credential $UserCredential

Import-PSSession $sfboSession

 

One big script

 

if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoExit -NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; Exit }

Import-Module MSOnline

$UserCredential = Get-Credential

Connect-MsolService -Credential $UserCredential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

$SP = Read-Host -Prompt 'Enter SharePoint Domain'

Connect-SPOService -Url https://$SP-admin.sharepoint.com -credential $UserCredential

Import-Module SkypeOnlineConnector

$sfboSession = New-CsOnlineSession -Credential $UserCredential

Import-PSSession $sfboSession

Pingbacks and trackbacks (1)+

Add comment