Using the Power of PowerShell with Synergy
✕
  • Solutions
    • Legacy Application Modernization
    • Distributed Computing
    • Modern UI/UX
    • Data Visibility
    • Enterprise Application Integration
    • Development Environment Optimization
    • Cloud Migration
    • Security
    • High Availability and Resilience
  • Products
    • Language
    • Development Environment
    • .NET Integration
    • Streaming Integration Platform
    • Web Services Framework
    • Roadmap
  • Services and Support
    • Professional Services Group
    • Developer Support
    • Application Support
  • Learning
    • Events
    • Online Courses
    • White Papers
    • Case Studies
    • Learning Resources
    • Blog
    • Synergy-e-News
  • Company
    • Leadership
    • Careers
    • Contact
    • News
  • +1-916-635-7300
  • Get Support
  • Documentation
  • Resource Center
✕
            No results See all results
            Using the Power of PowerShell with Synergy
            • Solutions
              • Legacy Application Modernization
              • Distributed Computing
              • Modern UI/UX
              • Data Visibility
              • Enterprise Application Integration
              • Development Environment Optimization
              • Cloud Migration
              • Security
              • High Availability and Resilience
            • Products
              • Language
              • Development Environment
              • .NET Integration
              • Streaming Integration Platform
              • Web Services Framework
              • Roadmap
            • Services and Support
              • Professional Services Group
              • Developer Support
              • Application Support
            • Learning
              • Events
              • Online Courses
              • White Papers
              • Case Studies
              • Learning Resources
              • Blog
              • Synergy-e-News
            • Company
              • Leadership
              • Careers
              • Contact
              • News
            • +1-916-635-7300
            • Get Support
            • Documentation
            • Resource Center
            ✕
                      No results See all results
                      Using the Power of PowerShell with Synergy
                      • Solutions
                        • Legacy Application Modernization
                        • Distributed Computing
                        • Modern UI/UX
                        • Data Visibility
                        • Enterprise Application Integration
                        • Development Environment Optimization
                        • Cloud Migration
                        • Security
                        • High Availability and Resilience
                      • Products
                        • Language
                        • Development Environment
                        • .NET Integration
                        • Streaming Integration Platform
                        • Web Services Framework
                        • Roadmap
                      • Services and Support
                        • Professional Services Group
                        • Developer Support
                        • Application Support
                      • Learning
                        • Events
                        • Online Courses
                        • White Papers
                        • Case Studies
                        • Learning Resources
                        • Blog
                        • Synergy-e-News
                      • Company
                        • Leadership
                        • Careers
                        • Contact
                        • News
                      • Home
                      • Blog
                      • Software Development
                      • Using the Power of PowerShell with Synergy

                      Using the Power of PowerShell with Synergy

                      Published by Jerry Fawcett on November 30, 2018
                      Categories
                      • Software Development
                      Tags

                      Like it or not, change is inevitable. Now that you’ve mastered the command prompt, it’s slowly but surely being replaced by PowerShell. Actually, this process was started by Microsoft way back in 2002, which is how PowerShell came about in the first place.

                      Starting with Windows 10, the PowerShell command prompt has replaced the Command Prompt as the default. (To control this, toggle the Taskbar setting “Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Widows Key+X.”)

                      PowerShell Up

                      So you opened a PowerShell window and now everything you try results in copious output in ominous red text? Luckily for those of us who are learning PowerShell from the ground up, PowerShell comes with very complete and verbose help. Just type

                      get-help cmdlet

                      For example, you’d use “get-help where” to learn about the powerful where object. However, if you’re familiar with any OO language you’ll probably find PowerShell quite natural.

                      One would think PowerShell is a Windows-only tool, but surprisingly, Microsoft has made it open source, and it’s also available on macOS, CentOS, and Ubuntu.

                      You can use PowerShell together with Synergy in many ways, and I’d like to share some of what I’ve learned. Using the power (pun intended) of PowerShell can be helpful in getting information on Synergy products from a machine. Getting this information without PowerShell would be difficult—especially for a non-technical person—and potentially error prone.

                      By preceding a PowerShell command with “powershell” you can actually run it from a DOS command line without opening a PowerShell console, as the command is passed to the PowerShell processor as a parameter. However, by doing this, you’ll lose the awesome power of tab completion available in the PowerShell console. Try it: Open a DOS command window and type “powershell /?”.

                      The PowerShell is Yours!

                      (At this point, I feel I must tell you that Synergy tools are currently not supported in a PowerShell environment. Ideas post, anyone?)
                      To list all Synergy products:

                      Get-WmiObject -ComputerName COMPUTERNAME -Class Win32_Product | sort-object Name | Select-Object Name |where{$_.name -like "*Synergy*"}
                      Output –
                      Name
                      ----
                      Synergy DBL Integration for Visual Studio 10.3.3f
                      Synergy/DE (X64) 10.3.3f
                      Synergy/DE 10.3.3f
                      Synergy/DE Online Manuals 10.3.3
                      Synergy/DE xfNetLink .NET Edition (X64) 10.3.3f

                      To list all Windows updates on a machine:

                      (New-Object -ComObject "Microsoft.Update.Session").CreateUpdateSearcher().QueryHistory(0,(New-Object -ComObject "Microsoft.Update.Session").CreateUpdateSearcher().GetTotalHistoryCount()) | Select-Object Title, Description, Date

                      If you need to retrieve all events from the Windows Event viewer that deal with the runtime, simply have the end user double-click on a batch file containing the command below and send you the file it creates (C:\temp\SynEventViewerEntries.txt).

                      powershell Get-EventLog -logname application -source dbr^|Format-List MachineName, Message, TimeGenerated ^|out-file C:\temp\SynEventViewerEntries.txt

                      To list all installed software on a machine,

                      Get-WmiObject -ComputerName FAWCETT -Class Win32_Product|Sort-Object name| Select-Object Name, Version

                      Just so you’re aware, when you get started, you may find no script will successfully run, because script execution is disabled by default. You can enable it as follows:

                      First, to verify the PowerShell’s execution policy, type

                      Get-ExecutionPolicy

                      You’ll probably see

                      Default is Restricted

                      To enable execution, you must open the PowerShell command prompt as an Administrator and type

                      Set-ExecutionPolicy Unrestricted –Force

                      And just for fun, if— like me—you miss the Windows Experience score that was first introduced with Windows Vista but is now removed, you can use PowerShell to get your machine’s Windows Experience score. The Windows Experience score is a benchmark that measures your PC’s performance in five categories: processor, memory, graphics, gaming graphics, and hard disk performance. The score is the lowest of these benchmarks. To get your machine’s score, run

                      Get-WmiObject -Class Win32_WinSAT

                      If you want to learn more, you can search online. Every PowerShell topic I searched for resulted in a wealth of information.

                      More Power(Shell) to you!

                      Some good resources:

                      Microsoft Official PowerShell documentation

                      Getting Started with Windows PowerShell

                      PowerShell: The smart person’s guide

                      Share
                      45

                      Leave a ReplyCancel reply

                      This site uses Akismet to reduce spam. Learn how your comment data is processed.

                      • Announcing New SDI Release, 2025.08.2277
                      • Static Code Analysis: Provide a Boost to Your Codebase
                      • With 40 Years at Synergex, Bill Mooney Is All In
                      • New 12.4 Features Release, 12.4.1.1003
                      • New SDI Release, 2025.06.1647
                      • Announcements
                      • Beta Testing
                      • Case Studies
                      • Code Exchange
                      • CodeGen
                      • CTO's Thoughts
                      • Development Tools
                      • DevPartner Conference
                      • Education
                      • Events
                      • Harmony Core
                      • Hiring
                      • Industry News
                      • Just for Fun
                      • Licensing
                      • News
                      • Open Source
                      • OpenVMS
                      • President's Thoughts
                      • Professional Services Group
                      • Release Notifications
                      • Security
                      • Software
                      • Software Development
                      • Success Stories
                      • Tech Article
                      • UI
                      • Uncategorized
                      • White Papers

                      STAY CONNECTED with Synergex

                      • Blog
                      • Facebook
                      • LinkedIn
                      • YouTube
                      SOLUTIONS
                      • Legacy Applications Modernization
                      • Modern UI/UX
                      • Data Visibility
                      • Enterprise Application Integration
                      • Development Environment Optimization
                      • Cloud Migration
                      • Security
                      • High Availability
                      PRODUCTS
                      • Language
                      • Development Environment
                      • Connectivity and Open-Source Tools
                      • Release Strategy
                      • Roadmap
                      SUPPORT
                      • Professional Services Group
                      • Developer Support
                      • Application Support
                      LEARNING
                      • Events
                      • Online Courses
                      • Learning Resources
                      • Blog
                      • Synergy-e-News
                      COMPANY
                      • Customers
                      • Leadership
                      • Careers
                      • Contact
                      Using the Power of PowerShell with Synergy

                      Privacy  |  Security  |  Terms  |  © 2024 Synergex

                      CodeGen 5.3.6 Released
                      September 23, 2018
                      EditorConfig: The Key to Consistent Coding Style in Visual Studio
                      January 9, 2019
                      CodeGen 5.3.6 Released
                      September 23, 2018
                      EditorConfig: The Key to Consistent Coding Style in Visual Studio
                      January 9, 2019