Skip to content

Instantly share code, notes, and snippets.

@miracles1315
miracles1315 / Connect-O365SecurityAndCompliance.ps1
Last active October 10, 2017 04:43
The function creates a remote PowerShell session to the Office 365 'Security And Compliance' service.
Function Connect-O365SecurityAndCompliance
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Security And Compliance' service.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Security And Compliance' service. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365SAC.
.PARAMETER Credential
@miracles1315
miracles1315 / Connect-O365AzureActiveDirectory.ps1
Created September 11, 2017 04:12
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the AzureAD module.
Function Connect-O365AzureActiveDirectory
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the AzureAD module.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the AzureAD module. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365AAD.
.PARAMETER Credential
@miracles1315
miracles1315 / Connect-O365ExchangeOnlineProtection.ps1
Last active September 11, 2017 16:30
The function creates a remote PowerShell session to the Office 365 'Exchange Online Protection' service.
Function Connect-O365ExchangeOnlineProtection
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Exchange Online Protection' service.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Exchange Online Protection' service. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365EOP.
.PARAMETER Credential
@miracles1315
miracles1315 / Connect-O365MSOnline.ps1
Created September 11, 2017 02:14
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the legacy MSOnline module.
Function Connect-O365MSOnline
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the legacy MSOnline module.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Azure Active Directory' (aka 'MS Online') service using the legacy MSOnline module. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365MSOL.
.PARAMETER Credential
@miracles1315
miracles1315 / Connect-O365ExchangeOnline.ps1
Last active September 11, 2017 23:56
The function creates a remote PowerShell session to the Office 365 'Exchange Online' service.
Function Connect-O365ExchangeOnline
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Exchange Online' service.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Exchange Online' service. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365EXO.
.PARAMETER Credential
@miracles1315
miracles1315 / Connect-O365SharePointOnline.ps1
Last active September 11, 2017 04:52
The function creates a remote PowerShell session to the Office 365 'SharePoint Online' service.
Function Connect-O365SharePointOnline
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'SharePoint Online' service.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'SharePoint Online' service, which is where getting information from and making changes for both 'SharePoint Online' & 'OneDrive For Business' are done. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365SPO.
.PARAMETER OrganizationName
@miracles1315
miracles1315 / Connect-O365SkypeForBusinessOnline.ps1
Last active September 11, 2017 16:50
The function creates a remote PowerShell session to the Office 365 "Skype For Business Online" service.
Function Connect-O365SkypeForBusinessOnline
{
<#
.SYNOPSIS
The function creates a remote PowerShell session to the Office 365 'Skype For Business Online' service.
.DESCRIPTION
The function creates a remote PowerShell session to the Office 365 'Skype For Business Online' service. Valid Office 365 credentials must be supplied. The function has an alias of Connect-O365SFBO.
.PARAMETER Credential
@miracles1315
miracles1315 / Get-O365IPAddress.ps1
Last active September 9, 2017 05:10
The function gets the Office 365 IP address & URL information, in XML format, and returns the Product (O365, SPO, etc...), AddressType (IPV4,IPV6, OR URL), and Address (Ex: 13.107.6.152/31) information.
Function Get-O365IPAddress
{
<#
.SYNOPSIS
The function gets the Office 365 IP address & URL information.
.DESCRIPTION
The function gets the Office 365 IP address & URL information, in XML format, and returns the Product (O365, SPO, etc...), AddressType (IPV4,IPV6, OR URL), and Address (Ex: 13.107.6.152/31) information.
.PARAMETER ErrorLog
@miracles1315
miracles1315 / New-CodeSigningCertificate.ps1
Last active December 20, 2018 11:04
This script creates a self-signed code signing certificate that can be used for testing purposes to to sign scripts.
<#
.SYNOPSIS
This script creates a self-signed certificate, exports it, and re-imports it into the Trusted Root Certification Authorities store.
.DESCRIPTION
This script creates a self-signed code signing certificate, valid for one year from the date/time created, that can be used for testing purposes to sign scripts. After the certificate is created, the issuer is untrusted. So, the script then exports the certificate into a .cer file and re-imports it into the Trusted Root Certification Authorities store for the current user (i.e. Cert:\CurrentUser\Root).
.PARAMETER DnsName
Specify one, or more, DNS names to put into the subject alternative name (SAN) extension of the certificate. The first DNS name is also saved as the subject name, issuer name (i.e. Issued By), and common name (i.e. Issued To). Default is the local computer name (i.e. $Env:ComputerName). This parameter has aliases of SubjectAlternativeName and SAN.