Variable Script blocks with Start-Job command

I need to have a path of the script in a background job. This was very challanging because the code $ScriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition is  not working while running a script as a job. What I ended up doing was building a scriptblock in the script that is starting the job: $ScriptPath = Split-Path -parent… Continue reading Variable Script blocks with Start-Job command

CUCM · Exchange · Powershell

Setting the Dialplan in CUCM with powershell

For sure after my previous post, there is a need to change the dialplan after the move… function Set-CiscoDialplan  { # #  Set a new VoiceMailprofile for the extention # Param( [Parameter(Mandatory=$True,Position=1)] [string]$DirectoryNumber, [string]$Dialplan, [string]$CUCMServer ) $username = ‘cucmuser’ $password = ‘cucmpassword’ $header = @{“Authorization” = “Basic “+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($username+”:”+$password))} $MyVMP = [xml]@” <soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:ns=”http://www.cisco.com/AXL/API/9.0″&gt; <soapenv:Header/>… Continue reading Setting the Dialplan in CUCM with powershell

CUCM · Exchange · Powershell

Getting the Voicemail Dialplan out of Cisco CUCM

Moving an user to cloud does impact the Voicemail for that user also. So I’m trying to find a way to update the VM-Dialplan in Cisco CUCM when moving an user to cloud. First step is to retrieve the current Dialplan: function Get-CiscoDialplan  {  #  # Get from the CiscoServer the configured VoiceMailProfile of the extention… Continue reading Getting the Voicemail Dialplan out of Cisco CUCM


Connecting to Exchange On-Premisse

Next to connecting to Exchange Online you want to to connect OnPrem also if you are in a Hybrid mode.  So I created a similar function to do that: Function Connect-ExchangeOnPremise{  $UserCredential = get-Credential “domain\userid”  $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://servername/PowerShell/ -Authentication Kerberos -Credential $UserCredential  Import-PSSession $Session -Prefix “OP” } So with Connect ExchangeOnPremise… Continue reading Connecting to Exchange On-Premisse

Exchange · Hybrid · Powershell

Connecting To Exchange Online

Thanks for all the other blogs and posts that I found I could create a function to put in my Microsoft.PowerShell_profile.ps1 file.  This has been working for me in all possible kind of scenario’s.  Function Connect-ExchangeOnline {     Param(         [parameter()]         [boolean]$ProxyEnabled = $True                 ,[parameter()]         [string]$CommandPrefix = ‘OL’         ,[parameter()]        … Continue reading Connecting To Exchange Online