Jump to content

Joe Lusk

  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

My Information

  • Location
  • Agent Count
    4000 - 6000 Agents

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks @WesleyNZ, i knew there had to be a more elegant way. I am relatively new to the mySQL code, so learning as I go.
  2. Never mind. I just did this a different way and pulled each row one at a time and added to a running variable
  3. So I am pulling a single row of data, but from multiple columns in a database table and making that into one string. I have done this by using the SQL Get DataSet command like this select MSPType, group_concat(email SEPARATOR ',') from useraccounts WHERE ClientID = '1204037' AND MSPType = 'XXX-MSP-Users' GROUP BY MSPTYpe Then I Fetch row 1 from the dataset This works and gives me the data that I want. The problem is that it returns it under a variable name of @sqlgroup_concat(emailseparator',')@ (which shows properly in the debug window) This variable name is unusable. If I set a new variable name equal to it it just makes the new variable equal to that long variable name, not the contents of it. Any thoughts on this, or a better way to do it?
  4. @EOpronet Sure, might be worth the purchase if it works. Thanks
  5. @HickBoy I would love an export. I managed to get something working using AutoIT, but it is less than perfect and requires a user to be logged on. This looks much better. Thanks in advance. I am actually most curious about the pre-removal operations. Are you doing more than you identified there?
  6. You are correct, that is the version and we have found the same things. Looks like manual is the only way by design.
  7. Has anyone had any luck with this since the updates to Cloud Protection Agent. I had a script that ran SEPPrep.exe with the RemoveSymantec=Y option, but that no longer seems to work. None of the msexec methods or wmi methods seem to work either. Any ideas?
  8. I have a unique situation where I an trying to modify a list to enable it to more easily work in a powershell script. The text looks like this: SprocketUsers,Domain Users,Password Sync It can vary in length so I am doing a ForEach type function with it in PS Now to use it in my PS script each CSV needs to have a single quote on it, like this: 'SprocketUsers','Domain Users','Password Sync' I can do a REGEX and split them out, but it appears that I can only work with the first match(?) SET: @Output1@ = MATCH(@sqldefaultgroups@ PATTERN (?<=^|,)(?:'{2}|(?:)|[^,'\r\n]+|'(?:'{2}|[^']+)+')(?=,|$)) Does anyone know any way to do this reformatting? Either via Automate scripting or PS
  9. I had done all of that and followed that document, but I just found my error. I didn't realize that the returned variables all had the prefix of sql. So I was expecting @preferredDC@,@preferredDCAID@,@Domain@, etc when it actually returns @sqlpreferredDC@,@sqlpreferredDCAID@,@sqlDomain@, etc. Well thanks for re-assuring what i did was correct. πŸ™‚
  10. I have a mySQL database setup and I can run SQL Get Value queries against it successful. However when I try to run this query (SELECT preferredDC,preferredDCAID,Domain,defaultOU,defaultgroups,emailformat,emaildomain,logonformat FROM CustomerPortal.clientVars where AutomateID=12) as a SQL Get DataSet function it only returns "System.Data.DataSet" as the %sqldataset% I formed the query using HiediSQL and it works fine in there. SET: %sqlresult% = [SELECT preferredDC FROM CustomerPortal.clientVars WHERE AutomateID=12] using DSN-xxxxxx; WORKS Set %sqldataset% = SQL Get DataSet: SELECT preferredDC,preferredDCAID,Domain,defaultOU,defaultgroups,emailformat,emaildomain,logonformat FROM CustomerPortal.clientVars where AutomateID=12 using DSN=xxxxxx; DOES NOT WORK Any ideas?
  11. @DarrenWhite99 I agree and prefer re-usable function scripts wherever possible. I am relatively new to Labtech scripting so I may have gone over some already trodden ground. That being said, this is part of a bigger function script that I have made and add to all of my scripts. I just felt the variable set was the most useful part for others, and since I couldn't find it anywhere else I thought someone else might find it useful too. Thanks for all of your contributions here, I have found them invaluable to my crash course in Labtech(Automate) scripting.
  12. I have looked and I can't find it either. Though I am not sure how much easier it can be then 2 lines; 1 to pull the email address, 2 to send the email πŸ™‚
  13. I added this little line and it has helped me tremendously. It allows the script to automatically email whoever kicked it off, not just a static email address. Since we have 30+ techs and close to 6000 agents, this is very useful. Function: Variable Set Set Type: SQL Query Parameter: select email from users where name ='@LTRUNBYUSER@' Variable Name: initiatoremail Then I use the send email function to email the @initiatoremail@ that the script has begun; including @script name@ variable (which I set) %clientname% and %computername%. Then again at various failure points, including other variables that provide a description of where it failed in the script. Lastly it sends an email upon success. This way when I kick the script off for a bunch of computers, I can track the state of each of them easily. I set up rules in my email client to sort them into folders by success/ failure etc. Maybe there was an easier way to do this, but I never found it. πŸ™‚
  • Create New...