Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Mengetahui Berapa Banyak Core Prosesor (PowerShell)
- Get-WmiObject –class Win32_processor | ft NumberOfCores,NumberOfLogicalProcessors
- # Mengetahui Berapa Banyak Core Prosesor (CMD)
- wmic cpu get NumberOfCores,NumberOfLogicalProcessors
- # Mendapatkan informasi power
- Get-WinEvent -LogName System | Where-Object -FilterScript { $_.ProviderName -eq "Microsoft-Windows-Kernel-Power" } | Select -First 10
- # Set windows variable, gunakan karakter = untuk baru/update, += untuk menambah
- $env:FTP_HOST=10.10.10.147
- # Atau (should remain even when close the session)
- [System.Environment]::SetEnvironmentVariable('FTP_HOST','10.10.10.147', [System.EnvironmentVariableTarget]::User)
- [System.Environment]::SetEnvironmentVariable('FTP_HOST','10.10.10.147', [System.EnvironmentVariableTarget]::Machine)
- # Melihat windows variable
- $env:FTP_HOST
- # Atau
- Get-ChildItem Env:FTP_HOST
- # Melihat semua windows variable
- dir env:
- # Atau
- Get-ChildItem Env:
- # Hapus windows environment variable
- $env:FTP_HOST = $null
- # Atau (untuk yang persisten)
- [Environment]::SetEnvironmentVariable("FTP_HOST", $null ,"User")
- [Environment]::SetEnvironmentVariable("FTP_HOST", $null ,"Machine")
- # enable long path
- New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
- -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Add Comment
Please, Sign In to add comment