Contact Info

Crumbtrail » Administration » Powershell » Powershell 1.0 » Export-Console

Export-Console - Powershell 1.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Export console configuration to a file


-Path string
      The path to the console file (*.psc1).

       Override restrictions that prevent the command from succeeding, apart
       from security settings. e.g. Force will override a files read-only attribute,
       but will attempt to reset the read-only attribute when the command completes.
       Do not overwrite the contents of an existing file.
       The default is to overwrite without warning.

       Describe what would happen if you executed the command without actually
       executing the command.
       Prompt for confirmation before executing the command.
        -Verbose, -Debug,-ErrorAction,-ErrorVariable, -OutVariable.

Export the current console configuration:

PS C:>export-console -path $pshome\Consoles\ConsoleS1.psc1

The $pshome variable holds the path to the PowerShell home (installation) folder.

Start a Windows PowerShell session with a set of stored console settings:

PS C:>powershell.exe -PsConsoleFile $pshome\Consoles\ConsoleS1.psc1