What type of language is PowerShell?
PowerShell is not a compiled Language. It doesn't produce IL directly either. Version 1 and Version 2 were totally interpreted The new version of PS V3 does indeed produce and cache expressions as IL in the background for speed and optomization purposes, but does not expose any compiled DLLs or such that other languages could call like regular CLR types (though other languages CAN host the PowerShell Engine, and execute script in it.)
So think of it like an interpreted language that just happens to live in a Dotnet Ecosystem which allows it to instantiate and interact with DOTNET objects thus making it seem like a "DOTNET language". PowerShell has its own Extended Type System (ETS) that makes it more dynamic.. You can create objects on the fly with whatever properties you want, or take an existing dotnet object, and add stuff to it.
PowerShell is a dynamic language. With dynamic scoping. It is a pipeline centric language, which passes rich objects through the pipeline (in contrast to binary/text pipelines in unix)
PowerShell is a command (verb and noun) centric language in philosophy and implementation, and though it is a RICH Object language, I wouldn't say its object ORIENTATED. you can interact with objects, and create them, but the goal is to produce task based COMMANDS
PowerShell lives in different environments. It is a line by line REPL Command line interpreter, but it is also a full scripting engine that can be embedded in other applications.
PowerShell has dynamic rather than lexical scoping of variables.
PowerShell has many "functional" features, with Scriptblocks being robust Lambdas, and it also (since V2) has full closures. Despite Lambdas being often considered a difficult concept. they flow nicely in powershell are are used by many people who have a hard time programming. In fact in PowerShell every script, or function , or advanced function is really a lamda. PowerSHell's lamdas are different from other lamdas because of the dyanmic scoping and also because they execute in the pipeline. Here is a simple example using built-in cmdlets
get-process | where { $_.MainWindowTitle -like '*stack*' } | select processname
Here you pass a lamda to the cmdlet where , and for each item coming through the pipeline it is evaluated, and its results go back into the pipeline which are then processed by the select command.
PowerShell (since V2) is a distributed language, with a complete remoting stack, that allows you to connect from one computer to many at the same time, execute commands with throlling, and process results on many streams (results, error, warnings etc) as they are happening on each computer.
So What kind of language is PowerShell?
Its a command centric language primarily targeting system administration and automation, but also a rich Object pipeline based language that lives in the dotnet ecosystem. Its a dynamic language that is dynamically scoped, with functional language features and the combination of features, I believe make it quite a new innovative language
Sadly however PowerShell has lots of Gotchas and issues, and while the learning curve is not steep from beginner to elementary, it is very steep going into intermediate.
PowerShell uses what’s called a dynamically typed scripting language. It can implement complex operations and it supports variables, functions, loops, branching, structured error/exception handling and it integrates with .NET. A dynamically typed language is when the type checking is done at run-time and not at compile-time and its variables have no type but can refer to a values of any type. Examples of dynamically typed languages include PHP, JavaScript, MATLAB, Ruby, Python, and more.
A few clarifications first:
The two categories: Compiled and Interpreted refer to the way the source code (or script) is translated into actions.
In an interpreted language, the commands are interpreted directly to actions by the interpreter.
In a compiled language the source code is first translated (or compiled) into a machine language (or an intermediate language like Java's byte-code or .NET's assembly) which will be turned into actions when run. In the case of a compiled program, you can look at the compiled code as the source code for an interpreted language and think of the CPU as the interpreter (or JVM in Java's case and the .NET Runtime for .NET).
The concepts of statically and dynamically typed language refer to the variables of that language.
A statically typed language (like the C family or Java) will define the type of the variable in its source, and the usage of that variable will be derived (usually by the coder) from the type.
A dynamically typed language (like Scheme or VBScript) the type of a variable will be defined by its usage. In some cases the coder simply can't define a type for a variable (like in Scheme or Bash script), and in others this is just optional (like VBScript).
The third concept-pair is strong vs. weak typed language. These concept refer to the rules imposed upon relation between variable types in the language (most commonly related to casts). The question of typing system "strength" is not as Boolean as other questions, so most languages fall somewhere between having a strong and week type system.
In a loosely (weak) typed language the compiler and the runtime will allow you to treat a variable of one type as if it were of another type and the behavior of such a situation is usually language specific (and in some cases even implementation specific). For instance, you can add together a number with a string and this will be considered valid code.
In a language with a strong type system the compiler and runtime will demand you perform specific actions in order to perform operations between different types of variables. The most common example for this is casting (like casting an int to a float).
Bottom line
To define PowerShell, it's an interpreted language, but this is a gray area when it comes to .NET. Defining variables in PowerShell does not include defining their type, and so it's obviously a dynamically typed language, and combining variables can be done seamlessly (as @halr9000 noted), which indicates a loose typing system.
In a sentence, I'd say it's an interpreted dynamically typed language with a weak type system.