Windows Server 2022 & Powershell All-in-One For Dummies. Sara Perrott
Чтение книги онлайн.

Читать онлайн книгу Windows Server 2022 & Powershell All-in-One For Dummies - Sara Perrott страница 32

СКАЧАТЬ Figure 4-7.

Snapshot of setting automatic updates in PowerShell.

      Downloading and installing updates

      To force Server Core to then detect and install any available updates, simply type the following command and press Enter.

       wuauclt /detectnow

      After your Windows Server operating system is installed, the next step is to customize it and make it your own! This involves things like installing roles and features, setting up remote administration, and configuring the firewall.

      Windows Server 2022 with Desktop Experience

      I'll start the customization discussion with the Desktop Experience. When you log into a server with Desktop Experience enabled, by default Server Manager will launch. A lot of the configuration and customization tasks you may have can be accomplished from Server Manager.

      Adding roles and features

      Roles and features are added in Windows Server 2022 with Desktop Experience through Server Manager.

      1 Open Server Manager.

      2 Choose Manage⇒ Add Roles and Features.

      3 On the Before You Begin page, click Next.

      4 On the Select Installation Type page, click Next.

      5 On the Select Destination Server page, click Next.

      6 Check the check box next to the role that you want to install and click Next.For this demonstration, I’ve chosen File Server under File and Storage Services (see Figure 4-8).FIGURE 4-8: The select Server Roles Screen with File Server selected.

      7 On the next screen, select any features you may want to install and then click Next.

      8 If you want the server to restart automatically if needed for the role you installed, you can select the Restart the Destination Server Automatically if Required check box. If a restart is not needed, or you don’t want it to restart, leave the check box unchecked.

      9 Click Install to install the roles and/or features you selected.

      Enabling remote administration

      

Remote Management is enabled by default and allows for remote administration through PowerShell. Remote Desktop is a separate setting that allows you to connect to the server and work with it directly.

      When a server has Desktop Experience, administrators often prefer to work with the server over Remote Desktop. This is disabled by default; you enable it to use it. If the firewall on the server is enabled and does not have Remote Desktop enabled, you won’t be able to connect to it. You need to enable the Remote Desktop – User Mode (TCP-In) rule listed in the Inbound Rules of your server’s firewall.

      1 With Server Manager open, click Local Server in the left-hand menu.

      2 Click the hyperlink next to Remote Desktop that says Disabled.

      3 In the dialog box that appears, select Allow Remote Connections to This Computer.A dialog box appears telling you that a firewall exception will be made for Remote Desktop.

      4 Click OK.

      5 If you want to set remote access for specific people or groups, click the Select Users button.

      6 Click Add, choose your person or group, and click OK.

      7 Click OK again on Remote Desktop Users to close out of it.

      8 Click OK one more time on the System Properties screen to enable Remote Desktop.

      Configure Windows Firewall

      1 From Server Manager, select Local Server on the left-hand side.

      2 Click the Private: On link next to Microsoft Defender Firewall.The Firewall & Network Protection app opens.

      3 Click Allow an App through Firewall.

      4 Select File and Print Sharing and enable it for the Private profile by selecting the check box under Private (see Figure 4-9).

      5 Click OK to save your changes.

Snapshot of allowing an app through Microsoft Defender Firewall.

      FIGURE 4-9: Allowing an app through Microsoft Defender Firewall.

      Windows Server 2022 Core

      Whether you’re running PowerShell commands against your Windows Server Core system while connected to the console or through remote PowerShell, you can do much of your configuration work with just a few PowerShell commands.

      Adding roles and features

      To get really good working with Server Core, half of the battle you face is learning how to find the things you want. In Server with Desktop Experience, you have the GUI to guide you. Not so with Server Core.

       Get-WindowsFeature *file*

       Install-WindowsFeature FS-FileServer

СКАЧАТЬ