Download Powershell 4.0 For Windows Server 2012

0 views
Skip to first unread message

Shaquita

unread,
Aug 5, 2024, 3:25:35 AM8/5/24
to silemedma
HeyScripting Guy! I have heard that it is possible to remove the graphical user interface (GUI) in Windows Server 2012 after you install the operating system. I have looked around the Internet but not found anything about this. I am concerned, because I am going to be doing my MCSE, and I am studying for my first test, the 70-410 exam, and that just seems like it would make a good question. So, can you help me out here?

So, the ServerManager module has been around for a long time. In Windows PowerShell 3.0 on Windows Server 2012 (or on Windows 8 with the RSAT tools installed) two functions and two aliases were added to the ServerManager module. In addition, two of the cmdlets were renamed.


There are actually four different flavors of the Windows Server 2012 interface. These are documented in a great TechNet Library article called Windows Server Installation Options. The four options are shown here.


Once I have a Windows Server 2012 core edition server, I can still use Remote Desktop (not much point in it), if I want to. When I do, the old-fashioned command prompt (cmd.exe) appears when logging on. Of course, I can launch Windows PowerShell by typing powershell at the command prompt. It is also possible to edit the registry to cause Windows Server 2012 core edition to automatically boot into Windows PowerShell. The image shown here illustrates Windows Server 2012 in core edition.


If the server has a full installation of Windows Server, the following command removes the two features: Server Graphical Shell and Graphical Management Tools and Infrastructure, and the resulting installation is Server Core.


PH, that is all there is to using Windows PowerShell to add and remove various features of the Windows GUI on your computer running Windows Server 2012. Join me tomorrow when I will talk about more cool Windows PowerShell stuff.


I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scri...@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.


I think youre question is more inline with security risks of putting it on older servers. The account access you have configured will always have rights with or without powershell being installed. The older servers probably have greater security risks that are inherent to their age that will be more of an issue before powershell is the foremost one.


If you install powershell on an old server and have domain accounts that become compromised and have access to other servers, then yes powershell being available directly on the compromised server is an issue, but you already have a compromised server with access to other servers where it is likely powershell is already a newer version.


You may need to do this locally on the Windows Server 2019 box. Once this is done, you can restart the sshd service (restart-service sshd) and you will be able to connect from your client using key based authentication.


If you want to learn about advanced configuration options for OpenSSH server on Windows Server 2019, consult the following article: -us/windows-server/administration/openssh/openssh_server_configuration?...


PowerShell is an object-oriented automation engine and scripting language with an interactive command-line shell that Microsoft developed to help IT professionals configure systems and automate administrative tasks.


Built on the .NET framework, PowerShell works with objects, whereas most command-line shells are based on text. PowerShell is a mature and well-proven automation tool for system administrators employed in both IT departments and external entities, such as managed service providers, because of its scripting capabilities.


PowerShell originated as a proprietary offering that was only available on Windows. Today, PowerShell is available by default on most recent Windows systems; simply type "powershell" into the Windows search bar to locate the PowerShell app. In 2016, Microsoft open sourced PowerShell and made it available on Linux and macOS.


Microsoft designed PowerShell to automate system tasks, such as batch processing, and to create system management tools for commonly implemented processes. The PowerShell language, similar to Perl, offers several ways to automate tasks:


Admins can use PowerShell to handle a wide range of activities. It can extract information on OSes, such as the specific version and service pack levels. "PowerShell providers" are programs that make data contained in specialized data stores accessible at the command line. Those data stores include file system drives and Windows registries.


PowerShell also serves as the replacement for Microsoft's Command Prompt, which dates back to DOS. Microsoft, for example, made PowerShell the default command-line interface (CLI) for Windows 10 as of build 14791. PowerShell's role as a command-line shell is how most users become acquainted with the technology.


The most appealing reason to use any kind of CLI is the potential for precise and repeatable control over a desired action or task flow that is difficult, or even impossible, to replicate with a traditional GUI.


Consider using a GUI to perform an intricate task. It can involve clicking buttons, moving sliders, selecting files from multilayered menus and other actions. GUIs were designed to be comfortable for humans to use, but they can be time-consuming, cumbersome and error-prone -- especially when a task must be repeated hundreds or thousands of times.


In contrast, PowerShell offers a CLI with a mature and detailed scripting language that enables a user with rudimentary programming skills to craft a detailed set of specific instructions, or a script, for a desired task. The task can be just about anything, from finding a desired file to describing a desired state configuration for the system or other systems. Once the script is created, it can be saved as a file and executed with a click, enabling the same task to be repeated exactly the same way for any number of repetitions. Different scripts can also be chained together to create complex and highly detailed tasks.


These simple-sounding characteristics are absolutely essential for automation and scalability -- letting the computer do the work as much as is needed for the environment. Thus, PowerShell can help system administrators perform complex and highly repetitive tasks with a high level of automation and accuracy that a GUI simply can't replicate.


Discoverability. Users can discover PowerShell's features using cmdlets, such as Get-Command, which creates a list of all the commands -- including cmdlets and functions -- available on a given computer. Parameters can be used to narrow the scope of the search.


Help capabilities. Users can learn more about PowerShell principles and particular components, such as cmdlets, through the Get-Help cmdlet. The -online parameter provides access to help articles on the web if available for a particular topic.


Remote commands. Admins can perform remote operations on one or multiple computers, taking advantage of technologies such as Windows Management Instrumentation and WS-Management. The WS-Management protocol, for example, lets users run PowerShell commands and scripts on remote computers.


Pipelining. With PowerShell, commands can be linked together through the pipe operator, symbolized as . This approach lets the output from a given command become the input for the next command in the pipeline sequence. The PowerShell pipeline lets objects, rather than text strings, flow from one cmdlet to another. This powerful capability is important for complex and detailed automation scripts.


With PowerShell 4.0, Microsoft introduced a configuration management platform called Desired State Configuration (DSC), which admins can use to set a specific configuration for a server. After the admin defines the server settings, PowerShell ensures the target nodes retain that desired state. DSC has two modes of operation: push mode and pull mode.


In push mode, a server sends notifications to the nodes. It's a one-way communication, where the admin sends notifications from a workstation. Setup costs are less because management runs from a device, but a notification can get lost if the device isn't connected to the network.


In pull mode, the IT department creates a pull server with the configuration details of each node using a Managed Object Format file. Each node contacts the pull server to check for a new configuration. If the new configuration is available, the pull server sends the configuration to the node. Admins can manage all devices regardless of their network connection. When a device connects to the network, it automatically contacts the pull server to check for a new configuration.


Admins use these resources to configure components, such as registry keys and Windows services, or to create and manage local users through a configuration script. For instance, the File resource manages files and folders, the Environment resource manages environment variables and the Registry resource manages the registry keys of a node. Windows default, or built-in, DSC resources include the following:


PowerShell Integrated Scripting Environment (ISE), introduced by Microsoft in PowerShell version 2.0, is a PowerShell host application used to write, test and debug scripts or write commands in a Windows GUI. To access the ISE, click Start, select Windows PowerShell and choose Windows PowerShell ISE. As an alternative, simply type powershell_ise.exe in the command shell or Windows Run box.


PowerShell ISE has sophisticated features that are familiar to Windows users. For instance, a user can highlight and copy a portion of a PowerShell command with a mouse or with the Shift + Arrow hot-key combination. The user can also paste the content anywhere in the editor window.


The F5 key launches a command directly from the editor. To execute a particular line, select it and press F8. The context-sensitive help displays matching cmdlets when the user starts to enter a command. A command add-on shows a list of cmdlets to select.

3a8082e126
Reply all
Reply to author
Forward
0 new messages