Mailbox role: Unified Messaging service FAILED
The following error was generated when "$error.Clear();
$lochost=hostname;
$ums=Get-UMService -Identity $lochost -DomainController $RoleDomainController;
Set-UMService $ums.Identity `
-DomainController $RoleDomainController `
-IrmLogPath ($RoleInstallPath + "\Logging\IRMLogs") `
-IrmLogMaxDirectorySize 262144000 `
-IrmLogMaxFileSize 10485760 `
-IrmLogEnabled $true
" was run: "The term 'hostname' is not recognized as the name of a cmdlet, function, script file, or operable pr
ogram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.".
The following error was generated when "$error.Clear();
$lochost=hostname;
$ums=Get-UMService -Identity $lochost -DomainController $RoleDomainController;
Set-UMService $ums.Identity `
-DomainController $RoleDomainController `
-IrmLogPath ($RoleInstallPath + "\Logging\IRMLogs") `
-IrmLogMaxDirectorySize 262144000 `
-IrmLogMaxFileSize 10485760 `
-IrmLogEnabled $true
" was run: "Cannot convert 'System.Object[]' to the type 'Microsoft.Exchange.Configuration.Tasks.UMServerIdParam
eter' required by parameter 'Identity'. Specified method is not supported.".
Not sure what I am doing wrong can anyone please advise on this.