This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First of all we are assuming we have delegated rights through CSP | |
# If we dont have delegated rights we need a login with reader rights in the customers subscription | |
# We then need 2 things. The Tenant ID of where the source subscription is located | |
# Then we need the subscription ID for the source subscription. | |
# If a customer has multiple subscriptions we will need the IDs for each and the script should be run for each. | |
# If you need to install Azure Module | |
Install-Module AzureRM | |
# Define these 2 variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optional, To get your tenant ID via PowerShell | |
Connect-msolservice | |
Get-MSOLCompanyInformation | select objectID | |
# Install SharePoint PowerShell If needed | |
Install-Module SharePointPnPPowerShellOnline | |
# Example https://$tenant.sharepoint.com/sites/$siteName | |
$tenant = 'Enter your Tenant Name in Here' # xxxx.onmicrosoft.com | |
$tenantId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' #Tenant ID, can be retrieved from Azure AD or PowerShell under optional. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## Connect to o365 ########## | |
## Change $username and $pass to match your environment | |
## See: https://blogs.technet.microsoft.com/robcost/2008/05/01/powershell-tip-storing-and-using-password-credentials/ for how to create a cred file. | |
$username = "Admin@tenant.onmicrosoft.com" | |
$pass = gc "F:\PSScripts\Office365-PowershellCreds.txt" | convertto-securestring | |
$creds = New-Object -typename System.Management.Automation.PSCredential ` | |
-argumentlist $username, $pass | |
$MESession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Creds -Authentication Basic -AllowRedirection | |
Import-PSSession $MESession -AllowClobber | |
Connect-MsolService -Credential $creds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//required plugins: code snippets, caldera forms, caldera forms run action | |
add_action('consult_req_submitted', 'consult_req_submitted_sync_hubspot'); | |
function consult_req_submitted_sync_hubspot( $data ){ | |
$hubspot_api_key = 'ffffffff-27a0-4591-9b68-27d4bb31ed76'; | |
$hubspot_list_id = '1'; //optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This was executed to create the mof and the checksum | |
$guid=Get-DscLocalConfigurationManager -CimSession asrtest-sql01 | Select-Object -ExpandProperty ConfigurationID | |
# Specify source folder of configuration | |
$source = "C:\DSC\HTTP\backup.mof" | |
# Destination is the Share on the SMB pull server | |
$dest = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration\$guid.mof" | |
Copy-Item -Path $source -Destination $dest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration SMTP { | |
Node HTTPComputers { | |
WindowsFeature SMTP{ | |
Name = 'SMTP-Server' | |
Ensure = 'Present' | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DSCLocalConfigurationManager()] | |
Configuration LCM_HTTPPULL | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string[]]$ComputerName, | |
[Parameter(Mandatory=$true)] | |
[string]$guid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DSCLocalConfigurationManager()] | |
Configuration LCM_HTTPPULL | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string[]]$ComputerName, | |
[Parameter(Mandatory=$true)] | |
[string]$guid |