To see the module paths of your environment, launch the following command: $Env:PSModulePathĢ0. To execute it, you need to append the environment. You can download certain modules in any directory you want. By default, PowerShell modules are installed in several directories. To check which repository you are using use the following : get-PSRepositoryġ9. You can find new PowerShell commands or Desired State Configuration (DSC) resources in the Gallery. The PowerShell Gallery is the central repository for PowerShell content. Getting the used/free space: Get-PSDrive C | Select-Object Used, Freeġ8. To get the health status of the disk: Get-PhysicalDisk | Sort Size | FT FriendlyName, Size, MediaType, SpindleSpeed, HealthStatus, OperationalStatus -AutoSizeġ7. Get the disk space information Get-WmiObject win32_logicaldisk Get-PhysicalDiskġ6. To get the reboot history : Get-EventLog system | where-object ġ5. To get the version of the PowerShell, use the following command:Ħ. You can also find the list of updates installed on the machine using the following command: Get-Hotfixĥ. Once installed, reboot the server which might take some time. Now you can install the updates using the following command. One of the first things you might want to do is to get the updates that need to be installed on the Operating System first which I did with the following command: Get-WindowsUpdateģ. I downloaded the module PSWindowsUpdate which will enable me to update the OS from PowerShell. So you will need to manually download it. Some modules are not available by default on the PowerShell. My goal in this article is to get PowerShell beginners on track and paint an idea of what Windows Powershell is capable of.ġ. However, the Microsoft website covers enough part which will lead to the Windows 2016 MCSE certification. In this article, I’m sharing some commands to start with. Since I’m mostly from a Unix/Linux background, I decided to dive a little bit more in the Windows Operating system. I decided to install Windows 2019 server core only i.e without GUI and take it as a challenge to learn more about it. Getting started with Windows 2019 nano server can be very challenging especially if you are not used to CLI on Linux servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |