logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
vexation  
#1 Posted : Sunday, June 17, 2018 10:23:19 AM(UTC)
vexation


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 8/28/2012(UTC)
Posts: 34

Thanks: 7 times
Was thanked: 3 time(s) in 2 post(s)
Per the subject, is anyone aware of a way to pass CustomProperty1 to a command in ScreenConnect? Ideally I'd want to get the entire property into a variable in Powershell so I can then regex split it. Anyone had any joy doing something similar?

Also - I'm trying to get Bitlocker status via ScreenConnect commands. Powershell Get-BitlockerVolume works a treat for Windows 8+ boxes but isn't supported in Windows 7 where you have to use Manage-BDE

Sadly there's no output when running manage-bde on ScreenConnect - not sure if is because it's running under the SYSTEM account or is an x86/x64 architecture issue of some description. Anyone had any joy doing this?

vexation  
#2 Posted : Monday, June 18, 2018 7:21:11 PM(UTC)
vexation


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 8/28/2012(UTC)
Posts: 34

Thanks: 7 times
Was thanked: 3 time(s) in 2 post(s)
I've worked around Manage-BDE by just using powershell WMI commands to get the same information.

Would be great if I could pass the ScreenConnect CustomProperty1 to a command tho (if anyone has any ideas)
Scott  
#3 Posted : Thursday, July 5, 2018 12:28:33 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,862
United States

Thanks: 3 times
Was thanked: 351 time(s) in 303 post(s)
@vexation so there are a few potential ways this could be done through an Extension. Could you give me a bit more information on what you're trying to do and how? What does your powershell command look like? What specific value are you wanting to pull from the CustomProperty (is it a specific identifier for Bitlocker)?
ScreenConnect Team
shawnkhall  
#4 Posted : Friday, July 6, 2018 8:02:28 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
"manage-bde -status" works fine for me from the SC commands feature (running 6.4).

i have a custom extension that does exactly that for passing CustomProperty values. it works by pre-parsing the executed command and injects the structure you want to use based on an external guide (stored in mysql).
vexation  
#5 Posted : Sunday, July 8, 2018 4:24:58 PM(UTC)
vexation


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 8/28/2012(UTC)
Posts: 34

Thanks: 7 times
Was thanked: 3 time(s) in 2 post(s)
Originally Posted by: Scott Go to Quoted Post
@vexation so there are a few potential ways this could be done through an Extension. Could you give me a bit more information on what you're trying to do and how? What does your powershell command look like? What specific value are you wanting to pull from the CustomProperty (is it a specific identifier for Bitlocker)?


I've written a powershell script which will perform an inventory of the system via WMI and registry queries, this includes stuff like the Bitlocker status - this is then wrapped up in JSON and posted to one of our servers. We send this script via the Commands area of ScreenConnect.

It's an easy way for us to inventory systems and manage the roll-out of Bitlocker (we can then query our DB server using PowerBI for very easy reporting)

All our sessions are grouped into Organizations (via CustomProperty1)

At the moment we have to specify the Organization name in the Powershell script itself, what I'd prefer to do is have the Organization name passed to our powershell script by ScreenConnect so we can use the same script and just run against every connected ScreenConnect client.

Passing CustomProperty1 or CustomProperty2 would be ideal.

I'm handy enough with Powershell but SC extensions are gibberish to me - if an extension is required it'd need to be signed now too? Not sure how much joy I'd have there unless the process is very simple.
mrsfield  
#6 Posted : Monday, July 9, 2018 1:46:58 PM(UTC)
mrsfield


Rank: Guest

Joined: 4/3/2018(UTC)
Posts: 4

As far as running a command and passing it back to a custom property, I would suggest the following extension "Set Session Properties From System Variables". It works really well for that functionality. The only downside is there is no scheduling system, so it has to be manually run. IMO the extension loses some value for dynamic information.

For writing your own extension, yes it has to be signed and approved. We went through the process to add the local IP address into the general tab. The process was a little confusing, but manageable. You have to use a cloud instance to submit the extension, it can be the free version. I initially emailed in about getting my extension signed and the support team sent back some clear instructions. It took almost a full 2 weeks from initial submission to getting the signed extension back for us.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.