what am I doing wrong? I’m trying to automate the process of changing our Operator ever 1.5 hours throughout the day. I set scheduled tasks to run my powershell commands (I have an add and remove command) that run for each Operator. My add command works fine. My remove command I keep getting a False response after the 3rd line ($x.agentsbyUri). Can someone show me what I’m doing incorrectly…and if this is the wrong sub forum direct me to the right one please?<\/p>\n
Import-Module skypeforbusiness\n$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:server.domain.com -Name \"Operator-1\"\n$x.AgentsByUri.Remove(\"sip:[email protected]\")\nSet-CsRgsAgentGroup -Instance $x\n<\/code><\/pre>\n
Advertisement
I get a False reply<\/p>","upvoteCount":3,"answerCount":5,"datePublished":"2018-08-15T13:32:33.000Z","author":{"@type":"Person","name":"jeffhays4292","url":"https://community.spiceworks.com/u/jeffhays4292"},"suggestedAnswer":[{"@type":"Answer","text":"
Advertisement
what am I doing wrong? I’m trying to automate the process of changing our Operator ever 1.5 hours throughout the day. I set scheduled tasks to run my powershell commands (I have an add and remove command) that run for each Operator. My add command works fine. My remove command I keep getting a False response after the 3rd line ($x.agentsbyUri). Can someone show me what I’m doing incorrectly…and if this is the wrong sub forum direct me to the right one please?<\/p>\n
Import-Module skypeforbusiness\n$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:server.domain.com -Name \"Operator-1\"\n$x.AgentsByUri.Remove(\"sip:[email protected]\")\nSet-CsRgsAgentGroup -Instance $x\n<\/code><\/pre>\nI get a False reply<\/p>","upvoteCount":3,"datePublished":"2018-08-15T13:32:33.000Z","url":"https://community.spiceworks.com/t/skype-powershell-problem/667924/1","author":{"@type":"Person","name":"jeffhays4292","url":"https://community.spiceworks.com/u/jeffhays4292"}},{"@type":"Answer","text":"
Can you please post your actual error message?<\/p>\n
If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>