Search | Register | Login 
CMShell > Discussion
Nederlands English
HomeHomeCMShellCMShellGeneralGeneralCM85: Howto Edit Device Line Appearance SettingsCM85: Howto Edit Device Line Appearance Settings
Previous
 
Next
New Post
1/24/2012 2:46 AM
 
Hi Team,
I am trying to update some line appearance settings for a bunch of users, specifically:
1. Assigning a monitor CSS.
2. Associate an End User.

I can retreive the current object, with the line attached:
$UDP = $cm | Get-CMDeviceProfile $UDPNAME -Full

But when I try and set the MonitorCSS:
$UDP.Lines.MonitorCss = "PRESENCE"
Property 'MonitorCss' cannot be found on this object; make sure it exists and is settable.
At C:\CUCM\dev.ps1:32 char:12
+ $UDP.Lines. <<<< MonitorCss = "SYS-PR"
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

I also get a similar error if I try to attach an enduser object to $UDP.Lines.Users

What is the correct method of updating Line Appearance Settings?
Thanks,
Aaron
 
New Post
1/24/2012 10:08 AM
 

Hi Aaron,

When updating associated properties such as "Lines" or "Users", remember that you are working with an array and thus need an index to select a specific item. The following should work to update the first line in the list:

$UDP.Lines[0].MonitorCss = "PRESENCE"

Or, if you have multiple lines, you could do something like this:

$UDP.Lines | %{ if( $_.Name -eq '123' ){ $_.MonitorCss = 'PRESENCE'  } }

This would iterate through the lines and set the "MonitorCss" property for the line with directorynumber '123', whithout the need to lookup the index in the list.

When testing this scenario in our lab, we did however encounter an issue with the "MonitorCss" property: Although this property will be updated correctly on the cucm, the retrieval does not work. We have this issue on our list to solve in the next major version of CMShell (2.0.0), which should be released shortly.

Sincerely,

Foxnet Helpdesk

 
New Post
1/25/2012 2:11 AM
 
Thanks Helpdesk,
That sorts the MonitorCSS issue but I am still strugling with associating users to lines:

$UDP = $cm | Get-CMDeviceProfile $UDPNAME -Full
$ENDUSER = $cm | Get-CMEndUser $USERNAME

$UDP.Lines[0].Users = @()
$UDP.Lines[0].Users += $ENDUSER.psobject.immediatebaseobject

or

$UDP.Lines[0].Users[0] = $ENDUSER

Help :)
 
New Post
1/25/2012 9:28 AM
 

Hi Aaron,

The first method you describe is the correct way and does actually work:

$UDP.Lines[0].Users = @()
$UDP.Lines[0].Users += $ENDUSER.psobject.immediatebaseobject

We tested this with CMShell 1.6.0 and we saw that the users are actually updated on the CUCM. However, these associated endusers seem to suffer from the same problem as the MonitorCss: The retrieval with CMShell fails.

We apologise for the inconvenience. This bug will be fixed in the upcoming release.

Thank you once again for your valuable feedback. It is much appreciated.

Sincerely,

Foxnet Helpdesk

 
New Post
1/25/2012 10:47 AM
 
Hi Helpdesk,
Yes you are correct it is working.

I'm having a bad day arent I :)

Thanks,
Aaron
 
Previous
 
Next
HomeHomeCMShellCMShellGeneralGeneralCM85: Howto Edit Device Line Appearance SettingsCM85: Howto Edit Device Line Appearance Settings


Privacy Statement
Foxnet BV 2011