Powershell Flashcards
Describe PowerShell
As an interactive command shell; Windows PowerShell serves as a direct administrator interface for managing Windows systems. As a scripting and administrative programming environment; Windows PowerShell provides a platform for automating systems.”
What is interpretive programming language platform?
A programming language whose programs are not directly executed by the host cpu but rather executed (or said to be interpreted) by a software known as an interpreter.
How is Windows PowerShell different from other scripting languages such as VBScript and Perl?
Windows PowerShell is not about text processing. It’s about object handling!
What is one way that you can combine commands or cmdlets in Windows PowerShell?
Using piplines
How can you use the modularity of cmdlets to perform a specific task?
…
What is required to run PowerShell?
Windows PowerShell uses Microsoft .NET Framework version 2.0 as a foundation.
How the new cmdlets and aliases are invoked?
…
How the aliases are assigned?
…
What relationship b/w .NET Framework and PowerShell?
Windows PowerShell uses Microsoft .NET Framework version 2.0 as a foundation and is a scripting language for .NET object in the same way as VBScript is a scripting language for the COM.
What are the benefits of having Windows PowerShell run on the .NET Framework?
…
What makes PowerShell easier to automate?
Object orientation plus .NET features makes Windows PowerShell easy to automate.
How can you take advantage of the object-oriented nature of Windows PowerShell?
…
What other object-oriented framewords Windows operating system supports besides .NET?
COM and WMI
What other object-oriented framewords can be used by PowerShell?
.NET - COM - WMI
How can you combine .NET
COM, and WMI objects to facilitate your tasks?,
How can PowerShell be extended?
Providers - Cmdlets - Scripts - functions - aliases
What is a cmdlet?
A commandlet (cmdlet) is a lightweight command used in the Windows PowerShell environment.
How does Exchange Management Shell (EMS) improve Windows PowerShell capabilities?
…
What needs to be set to allow scripts to be executed?
set-executionpolicy remotesigned
What version of .NET is installed on Windows 2008 server?
.NET 3.0
Why does PowerShell doesn’t run on Server Core?
.NET Framework doesn’t yet run on Server Core
How PowerShell is installed on Windows 2008 server?
Server Manager via Administrative Tools and select add Feature
Difference b/w Core server and Windows 2008 server?
…
What is the path to Windows PowerShell executables?
c:\windows\system32\WindowsPowerShell\v1.0
Is there a benefit to viewing the installation folder in Windows PowerShell?
…
What is the advantage of associating the .ps1 file extension with Notepad rather than Windows PowerShell?
To avaoid unwanted programs to be executed upon opening the ps1 file.
On which framework and runtime environment is Windows PowerShell based?
…
What is the default installation path of Windows PowerShell?
…
What is the default execution policy security level in Windows PowerShell version 1.0?
…
What are three kinds of objects that Windows PowerShell can work with?
…
How can the objects in Active Directory be managed in a domain controller which is running Core Server
using Windows PowerShell?,
Can the PowerShell scripts be used to manage Windows 2000 server or Windows 2000 Professional?
…
What is an object in PowerShell?
Object in PowerShell have interfaces, methods and properties
Which Framework offers a richer set of examples in which the computer configuration is changed by manipulating objects?
…
What does a method do?
Act on the object
Objects have types and kinds
TRUE
What is an object class?
An object class is the definition of the rules for an object: which properties are allowed. An object class is used as a template. All objects of the same class share similar traits, behaviors, and even some attribute values.
What are cmdlet?
Microsoft provides about 130 building blocks that perform many basic administrative functions; these fundamental tools are called cmdlets.
Get a list of all cmdlet available
Get-command
Display Help
Get-Help
Cmdlets are named using a ———– naming convention?
Verb-Noun
List all cmdlets with verb Add?
Get-Command -Verb Add - Get-Command -Verb Add : Get : New : Remove : Set
Reterive cmdlets with a specific ver or noun respectively!
Two other options for Get-Command are to use the Verb or Noun parameters to retrieve cmdlets with a specific verb or noun respectively.
Reterive a list of processes running
Get-Process
List running process with process id 0 and 5
Get-Process -id 0;5
List running process with a process name called spooler?
Get-Process -name processname1; processname2; ….;processnamen
Get help on Get-Process help command
Get-Help Get-process