Windows Server를 시작하기 위하여 필요한 30개의 PowerShell 명령어


참고: https://tunnelix.com/30-basic-powershell-commands-to-start-with-windows-server/

Get-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
Get-Hotfix

Get-host | select Version
$PSVersionTable

Get-EventLog system | where-object {$_.eventid -eq 6006} | select -last 10
Get-Service

Get-Module PSWindowsUpdate
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize

Get-process
Get-NetFirewallRule
Get-NetIPConfiguration
Get-NetAdapterLso
Get-NetRoute
Get-NetTCPConnection | ? {$_.State -eq “Listen”}

Get-WmiObject win32_logicaldisk
Get-PhysicalDisk

Get-PhysicalDisk | Sort Size | FT FriendlyName, Size, MediaType, SpindleSpeed, HealthStatus, OperationalStatus -AutoSize

Get-PSDrive C | Select-Object Used, Free
Get-PSRepository
$Env:PSModulePath
$env:PSModulePath = $env:PSModulePath + “;C:\ModulePath”
Get-Module -ListAvailable
find-module -Name PendingReboot | install-module
Import-Module PendingReboot
Get-Command -Module PendingReboot
Invoke-WebRequest https://gallery.technet.microsoft.com/scriptcenter/Get-RebootHistory-bc804819/file/130620/2/Get-RebootHistory.zip -outfile Get-RebootHistory.zip

Expand-Archive -path ‘.\Get-RebootHistory.zip’ -DestinationPath ‘C:\Users\Administrator\Documents\WindowsPowerShell\Modules’
Get-Command -?
Get-Help -name Compress-Archive
Get-Help -name Compress-Archive -examples

man Compress-Archive
help Compress-Archive

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s