IderaBlog
  • Home
  • Performance Monitoring & Tuning
    • SQL Diagnostic Manager for SQL Server
    • SQL Defrag Manager
    • SQL Diagnostic Manager for MySQL
    • Precise
    • SQL Doctor
    • SQL Query Tuner for SQL Server
    • SQL Workload Analysis for SQL Server
    • Uptime Infrastructure Monitor Formerly Uptime
  • Database Administration
    • SQL Admin Toolset
    • SQL Enterprise Job Manager
    • SQL Inventory Manager
    • SQL Safe Backup
  • Database Security
    • SQL Compliance Manager
    • SQL Secure
  • Data Modeling
    • ER/Studio Business Architect
    • ER/Studio Data Architect
    • ER/Studio Team Server
  • Database Development & Management
    • Aqua Data Studio
    • DB PowerStudio
  • More
    • Powershell
    • Free tools
    • Events
  • U
Select Page

Storing Cmd-Results in PowerShell Variables

by ps1Aug 17, 2009

You can run classic cmd commands from within PowerShell and store the results in variables. All you need to do is invoke cmd.exe with the /c switch like so:

$result = cmd.exe /c dir
$result

Twitter This Tip! ReTweet this Tip!

Tags

Aqua Data Studio cloud compliance data architecture database database administration database management database monitoring database performance database tools data governance data modeling DBA DBArtisan diagnostics ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events IDERA interbase Microsoft SQL Server monitoring Monyog MySQL news Oracle performance Precise product updates Rapid SQL real time monitoring Release releases SQL SQL Compliance Manager SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Doctor SQL Safe Backup SQL Secure SQL Server Uptime Infrastructure Monitor webinar
  • Facebook
  • Twitter
  • LinkedIn
  • YouTube

Idera uses cookies to improve user experience. By using our community you consent to all cookies in accordance with our Cookie policy.