Table 3.7 defines a few of the cmdlets available in Windows PowerShell. Again, there are hundreds of cmdlets, and the ones listed in the table are just some of the more common ones. You can retrieve a list of all the cmdlets starting here:
http://technet.microsoft.com/en- us/scriptcenter/dd772285.aspx
Using PowerShell 149 | |||
TABLE 3.7 | Windows PowerShell cmdlets | ||
Cmdlet | Definition | ||
Add- VMHardDiskDrive | Allows you to add a VHD file to a virtual machine. | ||
Block- SmbShareAccess | This cmdlet allows you to add a deny access control entry (ACE) to the security descriptor for the Server Message Block (SMB) share. | ||
Clear- History | Deletes entries from the command history. | ||
Close- SmbOpenFile | This allows you to forcibly close an open file by one of the clients of the Server Message Block (SMB) server. | ||
Close- SmbSession | This allows you to forcibly kill a Server Message Block (SMB) session. | ||
Format- table | Shows the results in a table format. | ||
Get- Date | Shows the date and time. | ||
Get- event | Shows an event in the event queue. | ||
Get- Help Install- WindowsFeature | Shows the syntax and accepted parameters for the Install- WindowsFeature cmdlet. | ||
Get- NetIPAddress | Shows information about IP address configuration. | ||
Get- NfsClientConfiguration | Shows configuration settings for an NFS client. | ||
Get- NfsMappedIdentity | Shows an NFS mapped identity. | ||
Get- NfsMappingStore | Shows the configuration settings for the identity mapping store. | ||
Get- NfsNetgroup | Shows the netgroup. | ||
Get- NfsSession | Shows the information about client systems that are currently connected to a share on an NFS server. | ||
Get- NfsShare | Shows an NFS share on the NFS server. | ||
Get- NfsSharePermission | Shows you the NFS shares permissions that are on an NFS server. | ||
Get- SmbOpenFile | Allows you to see basic information about the files that are open on the Server Message Block (SMB) server. | ||
TABLE 3.7 Windows PowerShell cmdlets (continued)
Get- SmbShare | Allows you to see the Server Message Block (SMB) shares on the computer. |
Get- WindowsFeature | Shows a list of available and installed roles and features on the local server. |
Get- WindowsFeature – ServerName | Shows a list of available and installed roles and features on a remote server. |
Import- Module | Adds modules to the current session. |
Invoke- command | Runs commands on local or remote computers. |
New- NfsShare | Allows you to create an NFS file share. |
New- event | Creates a new event. |
New- SmbShare | Allows you to create a new SMB share. |
New- VHD | Allows you to create a new VHD file. |
Out- file | Sends the job results to a file. |
Receive- job | Gets the results of a Windows PowerShell background job. |
Remove- job | Deletes a Windows PowerShell background job. |
Remove- NfsShare | Allows you to delete an NFS file share. |
Remove- SmbShare | Allows you to delete an SMB share. |
Set- Date | Sets the system time and date on a computer. |
Set- NetIPAddress | Modifies IP address configuration properties of an existing IP address. |
Set- NetIPv4Protocol | Modifies information about the IPv4 protocol configuration. |
Set- SmbShare | Allows you to modify the properties of the Server Message Block (SMB) share. |
Set- VM | Allows you to configure some virtual machine settings like configuring the locations for snapshot storage and smart paging. |
Exam Essentials
Cmdlet | Definition |
Set- VMDvdDrive | Allows you to set a virtual machine to use a DVD or ISO file. |
Set- VMMemory | Allows you to set the RAM for a virtual machine. |
Start- job | Starts a Windows PowerShell background job. |
Stop- job | Stops a Windows PowerShell background job. |
Trace- command | Configures and starts a trace of a command on a machine. |
Uninstall- WindowsFeature | Removes a role or feature. |
Summary
In this chapter, you learned how to install Windows Server 2022 Datacenter (Desktop Experience), and you installed the Windows Server 2022 Server Core. Remember, Server Core is a slimmed- down version of Windows Server. With no GUI desktop available, it’s a safer alternative to a normal Windows installation. As discussed, a nice advantage of Windows Server 2022 is that you can change from Server Core to the GUI version and back again.
I talked about installing updates and how to install and configure WSUS. I also discussed Features on Demand, which allows you to remove roles and features from the operating system and remove the associated files completely from the hard drive, thus saving disk space.
Finally, I discussed how configuring file and storage solutions can be highly effective in your organization. You now have a better understanding of how Windows Server 2022 can provide you with extended functionality for effectively controlling corporate data.
Exam Essentials
Understand Windows Server 2022 Desktop Experience vs. Server Core. Understand the difference between the Windows Server 2022 Desktop Experience version and the Windows Server 2022 Server Core version.
Understand Features on Demand. Understand the feature called Features on Demand.
Microsoft loves to ask exam questions about its new features, and this will be no exception. Understand how features and roles stay on the system until you physically remove them from the hard drive.
Know how to configure NTFS security. One of the major advantages of using NTFS over FAT32 is access to additional security features. NTFS allows you to put security at the file and folder layers. NTFS security is in effect whether the user is remote or local to the computer with the data.
Understand Windows PowerShell. Understanding Windows PowerShell is not only important for the exam, but it will also allow you to configure Server Core more efficiently. Windows PowerShell is a command-l ine utility that allows you to run single cmdlets as well as run complex tasks to exploit the full power from PowerShell.