සිංහල නිතර අසන පැන POWERSHELL

By | May 24, 2015

සංකල්පය: වැඩිම වාර ගණනක් Powershell ගැන ප්රශ්න ඇසුවා.

ඔබ විවිධ ක්රම මෙම ලැයිස්තුව භාවිතා කළ හැක:

  • තිර රචනය බවට / පේස්ට් විධාන පිටපත් කිරීමට
  • ඉක්මනින් නිශ්චිත විධානය පහත දැක්වෙන syntax භාවිතා බැලීමට
  • ඔබේ තාක්ෂණික දැනුම වැඩි දියුණු කිරීම
  • නව විධානයන් සොයා ගැනීමට
  • රැකියා සම්මුඛ පරීක්ෂණයකදී සූදානම් කිරීම

යාවත්කාලීන කිරීම
ජූලි 02, 2015
කර්තෘ powershell-guru.com
මූලාශ්රය sinhala.powershell-guru.com
ප්රවර්ග
75
ප්රශ්න
610


ACL
Active Directory
Alias
Arrays
Browsers
Certificates
Characters
CIM
Comments
COM Objects
Compare
Computer
Credentials
CSV
Culture
Date
Drives
Environment
Errors
Event Viewer
Files
Folders
Format Operator (-f)
Functions
GPO
GUI
Hardware
Hashtables
Help
History
Jobs
Keyboard
Loops
Math
Memory
Messages
Modules
Microsoft Excel
Microsoft Exchange
Microsoft Outlook
Microsoft SharePoint
Networking
Openfiles
Operators
Parameters
Password
Powershell ISE
Printers
Processes
PSObject
Quest
Random
RDP
Regedit
Regex
Remote
Restore
Scheduled Tasks
Search
SCCM
Services
SMTP
Snapins
Sounds
Static .NET Methods
Strings
System
Try/Catch
Variables
Symantec Vault
Windows10
Windows 2012
Windows Azure
Windows Forms
WMI
XML

System

PowerShell මගේ අනුවාදය තීරණය කරන්නේ කෙසේද?

පසු ගැළපුම සඳහා තවත් අනුවාදය දී PowerShell ගෙන යන්නේ කෙසේද?
powershell.exe -Version 2.0

PowerShell සමග කේත රචනය තුල අවම PowerShell අනුවාදය (3.0 සහ ඊට වැඩි) අවශ්ය කරන්නේ කෙසේද?
#Requires -Version 3.0

PowerShell සමඟ තිර රචනය සඳහා පරිපාලන වරප්රසාද අවශ්ය කරන්නේ කෙසේද?

PowerShell සමඟ තිර රචනය හි පරාමිතීන් පරීක්ෂා කරන්නේ කෙසේද?
help -Name .\Get-ExchangeEnvironmentReport.ps1 -Full

PowerShell සමග වත්මන් පරිශීලක සඳහා තොරතුරු ලබා ගන්නේ කෙසේද?
[Security.Principal.WindowsIdentity]::GetCurrent()

කොහොමද, නිර්මාණය වෙනස් කිරීම, හා PowerShell සමග පැතිකඩ රීලෝඩ් ද?

PowerShell සමග කේත රචනය තුල තත්පර 5 / විනාඩි Pause කරන්න කොහොමද?
Start-Sleep -Seconds 5
Start-Sleep -Seconds 300 # 5 minutes

PowerShell සමග පසුගිය ඇරඹුම් කාලය ලබා ගන්නේ කෙසේද?
(Get-CimInstance -ClassName win32_operatingsystem).LastBootUpTime

PowerShell සමග වර්ගය ත්වරක ලබා ගන්නේ කෙසේද?

PowerShell සමඟ ආරම්භක වැඩසටහන් ලැයිස්තු ගත කිරීම සඳහා කෙසේද?

PowerShell සහිත ඉල්ලුම් අස්ථාපනය කෙසේද?

සමස්ත ඩෙස්ක්ටොප් හෝ PowerShell සමග ක්රියාකාරී කවුළුවක තිර පිටපතක් ලබා ගන්න කෙසේද?
Take-ScreenShot -Screen -File 'C:\scripts\screenshot.png' -Imagetype JPEG
Repository : Take-ScreenShot

PowerShell සමග MSMQ පෝලිම් සඳහා පණිවුඩය ගණන් ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාත්මක ප්රතිපත්තීන් සකස් කරන්නේ කෙසේද?

PowerShell සමඟ කෙටි මග නිර්මාණය කරන්නේ කෙසේද?

PowerShell සමග කාර්ය තීරුව කිරීමේ වැඩසටහනක් අනිනවා හෝ unpin කෙසේද?

PowerShell සමග වින්ඩෝස් එක්ස්ප්ලෝරර් විවෘත කිරීමට කෙසේද?
[Diagnostics.Process]::Start('explorer.exe')
Invoke-Item -Path C:\Windows\explorer.exe

PowerShell සමඟ උපාංග ධාවකයින් ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-WmiObject -Class Win32_PnPSignedDriver
Get-WindowsDriver -Online -All
driverquery.exe

PowerShell සමග GUID නිර්මාණය කරන්නේ කෙසේද?

PowerShell සමග වත්මන් පරිශීලක සඳහා තාවකාලික ඩිරෙක්ටරිය ස්ථානය ලබා ගන්නේ කෙසේද?
[System.IO.Path]::GetTempPath()

PowerShell එක් තනි මාර්ගය බවට මාර්ගය හා ළමා මාර්ගය එක්වන කෙසේද?
Join-Path -Path C:\ -ChildPath \windows

සියලු cmdlets PowerShell සමග “Get- *” ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-Command -Verb Get

PowerShell සමග විශේෂ පද්ධතිය ෆෝල්ඩර ලැයිස්තු ගත කිරීම සඳහා කෙසේද?

PowerShell සමග, ISO / වූ වර්චුවල් ඩ්රයිව් ගොනු සවි කරන්නේ කෙසේද?
Mount-DiskImage 'D:\ISO\file.iso' # ISO
Mount-DiskImage 'D:\VHD\file.vhd' # VHD

PowerShell ස්ථාපනය .NET රාමුව අනුවාදයන් පරීක්ෂා කරන්නේ කෙසේද?

මෙම .NET රාමුව අනුවාදය 4.5 PowerShell ස්ථාපනය කරන්නේ නම් පරීක්ෂා කරන්නේ කෙසේද?
(Get-ItemProperty -Path 'HKLM:\Software\Microsoft\NET Framework Setup\NDP\v4\Full' -EA 0).Version -like '4.5*'

PowerShell සමග (මෙය වින්ඩෝස් මෙහෙයුම් PowerShell සැසිය පිළිබඳ වාර්තාවක් නිර්මාණය කිරීමට) ඒ පිටපත ආරම්භ කිරීමට හෝ නවතා කෙසේද?
Start-Transcript -Path 'C:\scripts\transcript.txt
Stop-Transcript

PowerShell සමඟ නිශ්චිත ස්ථානයක වත්මන් බහාළුම වෙනස් කළ හැක්කේ කෙසේද?
Set-Location -Path 'C:\scripts'

PowerShell සමග තිරය ඉවත් කරන්නේ කෙසේද?
Clear-Host
cls # Alias

PowerShell සමග ප්රදර්ශනය යෝජනාව වෙනස් කළ හැක්කේ කෙසේද?
Set-DisplayResolution -Width 1280 -Height 1024 -Force # Windows 2012

PowerShell සමග “සම්පූර්ණ තිරය” කවුළු තබා ගන්නේ කෙසේද?
mode.com 300

PowerShell සමග පින්තූරයක් මානයන් (පළල සහ උස) ලබා ගන්නේ කෙසේද?

PowerShell සමග වින්ඩෝස් නිෂ්පාදන යතුර ලබා ගන්නේ කෙසේද?

Perfmon

PowerShell සමග පසුගිය තත්පර 5 (10 ගුණයක්) දින (සාමාන්ය) වර්තමාන “% ප්රොසෙසරයකින් ටයිම්” ලබා ගන්නේ කෙසේද?
(Get-Counter '\Processor(_total)\% Processor Time' -SampleInterval 5 -MaxSamples 10).CounterSamples.CookedValue

Assemblies

PowerShell සමග රැස්වීම් පැටවීම සඳහා කෙසේද?

PowerShell අධිකව වත්මන් .NET එකලස්කිරීම් පරීක්ෂා කරන්නේ කෙසේද?

PowerShell සමග GAC (ගෝලීය සමුළුව මතකය) මාර්ගය සොයාගත හැක්කේ කෙසේද?

Clipboard

PowerShell සමග අලවයි ප්රතිඵල පිටපත් කිරීමට කෙසේද?

PowerShell සමග අලවයි අන්තර්ගතය ලබා ගන්නේ කෙසේද?
Add-Type -AssemblyName PresentationCore
[Windows.Clipboard]::GetText()

Hotfixes

PowerShell සමග ස්ථාපනය hotfixes ලබා ගන්නේ කෙසේද?
Get-HotFix -ComputerName $computer

මෙම hotfixes PowerShell සමඟ නිශ්චිත දිනට පසුව / පෙර ස්ථාපනය ලබා ගන්නේ කෙසේද?
Get-HotFix | Where-Object -FilterScript { $_.InstalledOn -lt ([DateTime]'01/01/2015') } # Before 01/01/2015
Get-HotFix | Where-Object -FilterScript {$_.InstalledOn -gt ([DateTime]'01/01/2015')} # After 01/01/2015

එය hotfix PowerShell ස්ථාපනය කරන්නේ නම් පරීක්ෂා කරන්නේ කෙසේද?
Get-HotFix -Id KB2965142

මෙම hotfixes PowerShell සමඟ දුරස්ථ පරිගණකය මත ස්ථාපනය ලබා ගන්නේ කෙසේද?
Get-HotFix -ComputerName $computer

Pagefile

PowerShell සමග Pagefile තොරතුරු ලබා ගන්නේ කෙසේද?
Get-WmiObject -Class Win32_PageFileusage | Select-Object -Property Name, CurrentUsage, AllocatedBaseSize, PeakUsage, InstallDate

PowerShell සමග Pagefile සඳහා නිර්දේශිත ප්රමාණය (MB) ලබා ගන්නේ කෙසේද?
[Math]::Truncate(((Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory) / 1MB) * 1.5

PowerShell සමග (ඩී 🙂 තැටිය මත Pagefile (4096 මෙබ) නිර්මාණය කරන්නේ කෙසේ ද?

PowerShell සමග (සී 🙂 තැටිය මත Pagefile ඉවත් කිරීමට කෙසේද?

Maintenance

PowerShell සමග තැටියේ කැබලි පරීක්ෂා කරන්නේ කෙසේද?

PowerShell සමග ධාවකයන් තිබෙන තැටියේ ඉඩ පරීක්ෂා කරන්නේ කෙසේද?

Up


Files

PowerShell සමග ගොනුව විවෘත කළ හැක්කේ කෙසේද?
Invoke-Item -Path 'C:\scripts\file.txt'
.'C:\scripts\file.txt'

PowerShell සමග ගොනුව කියවීමට කෙසේද?
Get-Content -Path 'C:\scripts\file.txt'
gc "C:\scripts\file.txt" # Alias

PowerShell සමග ගොනුවට ප්රතිදානය ලිවීමට කෙසේද?
'Line1', 'Line2', 'Line3' | Out-File -FilePath 'C:\scripts\file.txt'
'Line1', 'Line2', 'Line3' | Add-Content -Path file.txt

PowerShell සමග වත්මන් විධානාවලි ගොනුවක් වන සම්පූර්ණ නම ලබා ගන්නේ කෙසේද?
$MyInvocation.MyCommand.Path

PowerShell සමග / තැපැල් ගොනු සංකෝචනය කෙසේද?
Add-Type -AssemblyName 'System.IO.Compression.Filesystem'
[System.IO.Compression.ZipFile]::CreateFromDirectory($folder,$fileZIP)

Uncompress කෙසේද / PowerShell ගොනු unzip?
Add-Type -AssemblyName 'System.IO.Compression.Filesystem'
[System.IO.Compression.ZipFile]::ExtractToDirectory($fileZIP, $folder)

PowerShell සමග zip archive දී ගොනු බලන්න කෙසේද?
Add-Type -AssemblyName 'System.IO.Compression.Filesystem'
[System.IO.Compression.ZipFile]::OpenRead($fileZIP)

PowerShell සමග කි.බ. තුළ ගොනු විශාලත්වය ප්රදර්ශනය කිරීමට කෙසේද?
(Get-ChildItem -Path .\winsrv.dll).Length /1KB
(Get-ChildItem -Path .\winsrv.dll).Length /1MB
(Get-ChildItem -Path .\winsrv.dll).Length /1GB

PowerShell සමග 1 GB වඩා විශාල හෝ ඊට අඩු ගොනු සොයා ගන්නේ කෙසේද?

PowerShell සමග දීර්ඝ තොරව ගොනුවේ නම ප්රදර්ශනය කිරීමට කෙසේද?
[System.IO.Path]::GetFileNameWithoutExtension('C:\Windows\system32\calc.exe') # Return calc

PowerShell සමග ගොනුව දීර්ඝ ප්රදර්ශනය කිරීමට කෙසේද?
[System.IO.Path]::GetExtension('C:\scripts\file.txt') # Return .txt

PowerShell සමග ගොනුවේ ගොනු අනුවාදය ලබා ගන්නේ කෙසේද?

PowerShell සමග ගොනුවේ හැෂ් ලබා ගන්නේ කෙසේද?
(Get-FileHash $file).Hash

PowerShell සමග ගොනුවේ තුළ MD5 / SHA1 තිර අගය ලබා ගන්නේ කෙසේද?
Get-FileHash $file -Algorithm MD5
Get-FileHash $file -Algorithm SHA1

PowerShell සමග සැඟවුණු ගොනු ප්රදර්ශනය කිරීමට කෙසේද?

ගොනු PowerShell සමග දීර්ඝ තිබේ නම් පරීක්ෂා කරන්නේ කෙසේද?

PowerShell සමග “කියවීමට පමණක්” ලෙස ගොනු සකස් කරන්නේ කෙසේද?
Set-ItemProperty -Path .\file.txt -Name IsReadOnly -Value $true

PowerShell සමග ගොනුව සඳහා පසුගිය සතියේ සඳහා “LastWriteTime” අංග වෙනස් කළ හැක්කේ කෙසේද?
Set-ItemProperty -Path .\file.txt -Name LastWriteTime -Value ((Get-Date).AddDays(-7))
If not working, use Nirsoft tool: BulkFileChanger.

PowerShell සමග නව ගොනුව නිර්මාණය කරන්නේ කෙසේද?
New-Item -ItemType File -Path 'C:\scripts\file.txt' -Value 'FirstLine'

PowerShell සමග ගොනුව යළිනම් කෙසේද?
Rename-Item -Path 'C:\scripts\file.txt' -NewName 'C:\scripts\powershellguru2.txt'

PowerShell සමග බහු ගොනු කෙසේද තොග සඳහා / කණ්ඩායම නැවත නම්?
Get-ChildItem -Path C:\scripts\txt | Rename-Item -NewName { $_.Name -replace ' ', '_' }

PowerShell සමග ගොනුව මකා ගන්නේ කෙසේද?
Remove-Item -Path 'C:\scripts\file.txt'

PowerShell සමග ගොනුවේ 10 නවතම රේඛා ප්රදර්ශනය කිරීමට කෙසේද?
Get-Content -Path 'C:\scripts\log.txt' -Tail 10

PowerShell සමග ෆෝල්ඩරයේ ගොනු කිහිපයක් වාරණය කිරීම කොහොමද?
Get-ChildItem -Path 'C:\scripts\Modules' | Unblock-File

PowerShell සමග ගොනුව හිස් පේළි ඉවත් කරන්නේ කොහොමද?
(Get-Content -Path file.txt) | Where-Object -FilterScript {$_.Trim() -ne '' } | Set-Content -Path file.txt

ගොනු PowerShell සමග පවතී නම් පරීක්ෂා කරන්නේ කෙසේද?

PowerShell සමග ෆෝල්ඩරය තුළ නවතම / පැරණිතම නිර්මාණය ගොනුව ලබා ගන්නේ කෙසේද?

PowerShell සමග ගොනුව අනුපිටපත් රේඛා ඉවත් කරන්නේ කොහොමද?

PowerShell සමග ෆෝල්ඩරය තුළ වැඩි නිර්මාණය ගොනු හෝ 1 ට අඩු මාසික ලබා ගන්නේ කෙසේද?

PowerShell සමග ෆෝල්ඩරය තුළ වැඩි නිර්මාණය ගොනු ට වඩා අඩු ෙහෝ ඊට වසර 1 ලබා ගන්නේ කෙසේද?

PowerShell සමග ගොනු කිරීමට විචල්ය අගය අපනයනය කිරීමට කෙසේද?
Set-Content -Path file.txt -Value $variable

PowerShell සමග ෆෝල්ඩරය තුළ ඇති ගොනු සංඛ්යාව (* .txt) ගණන් ගන්නේ කෙසේද?

PowerShell සමග බහු ගොනු තුල සංගීත සෙවීමට කෙසේද?
Select-String -Path 'C:\*.txt' -Pattern 'Test'

PowerShell සමග ගොනුවේ පසුගිය / පළමු පෙළ ප්රදර්ශනය කිරීමට කෙසේද?

PowerShell සමග ගොනුවේ නිශ්චිත මාර්ගයක් සංඛ්යාවක් ප්රදර්ශනය කරන්නේ කෙසේද?

PowerShell සමග ගොනුවේ රේඛා ගණන ගණන් ගන්නේ කෙසේද?

PowerShell සමග ගොනුවේ අක්ෂර හා වචන ගණන ගණන් ගන්නේ කෙසේද?

PowerShell සමග ගොනුව බාගත කිරීම සඳහා කෙසේද?
Invoke-WebRequest -Uri 'http://www.nirsoft.net/utils/searchmyfiles.zip' -OutFile 'C:\tools\searchmyfiles.zip'

PowerShell සමග ගොනුවේ සම්පූර්ණ මාර්ගය පෙන්වීමට කෙසේද?
Resolve-Path -Path .\script.ps1 # Return C:\Scripts\script.ps1

Copy

PowerShell සමග ෆෝල්ඩරය එක් ගොනුව පිටපත් කෙසේද?
Copy-Item -Path 'C:\source\file.txt' -Destination 'C:\destination'

PowerShell සමග බහු ෆෝල්ඩර එක් ගොනුව පිටපත් කෙසේද?

PowerShell සමග එක ෆෝල්ඩරයකට බහු ගොනු පිටපත් කිරීමට කෙසේද?
Get-ChildItem -Path 'C:\source' -Filter *.txt | Copy-Item -Destination 'C:\destination'

Up


Active Directory

Domain & Forest

Computers

Groups

Organizational Unit (OU)

Users

Domain & Forest

PowerShell සමග ක්රියාකාරී නාමාවලිය ගෝලීය නාමාවලිය සේවාදායක සොයා ගන්නේ කෙසේද?
[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().GlobalCatalogs

PowerShell සමග ක්රියාකාරී නාමාවලිය අඩවි සොයා ගන්නේ කෙසේද?
[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites

PowerShell සමග වත්මන් වසම පාලකය සොයා ගන්නේ කෙසේද?
(Get-ADDomainController).HostName

PowerShell සමඟ වසම තුළ සියලු වසම පාලකයන් සොයා ගන්නේ කෙසේද?

PowerShell සමග ක්රි.ව ප්රතිවලිත අසාර්ථක සොයා ගන්නේ කෙසේද?
Get-ADReplicationFailure dc02.domain.com # Windows 8 and 2012

PowerShell සමග ක්රියාකාරී නාමාවලිය වනාන්තර සඳහා අවශ්යයෙන්ම ජීවිත කාලය සොයා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය වනාන්තර / වසම පිළිබඳ විස්තර ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය දී “වන සංස්කරණයන් වස්තූන්” රුවනයකි මාර්ගය ලබා ගන්නේ කෙසේද?
(Get-ADDomain).DeletedObjectsContainer

PowerShell සමග ක්රියාකාරී නාමාවලිය දී ක්රි.ව පිළිසකර බඳුනට අංගය සක්රීය කරන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය පිළිසකර බඳුනට සිට වෙළඳ දැන්වීම් ගිණුම යළි ගොඩනඟන්නේ කෙසේද?
Get-ADObject -Filter 'samaccountname -eq "powershellguru"' -IncludeDeletedObjects | Restore-ADObject

PowerShell සමග FSMO චරිත සොයා ගන්නේ කෙසේද?

PowerShell සමඟ නිශ්චිත වසම පාලකය වෙත සම්බන්ධ වීමට කෙසේද?
Get-ADUser -Identity $user -Server 'serverDC01'

PowerShell සමග වත්මන් ආරම්භක පැලැල්ල සේවාදායකය ලබා ගන්නේ කෙසේද?

PowerShell සහිත පරිගණකය “gpupdate” ඉටු කිරීම සඳහා කෙසේද?
Invoke-GPUpdate -Computer $computer -Force -RandomDelayInMinutes 0 # Windows 2012

Groups

PowerShell සමග ක්රියාකාරී නාමාවලිය නව කණ්ඩායමක් නිර්මාණය කරන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය පිරිසක් ඉවත් කරන්නේ කොහොමද?
Remove-ADGroup -Identity 'PowershellGuru'

PowerShell සමග ක්රියාකාරී නාමාවලිය පිරිසකට පරිශීලක එකතු කරන්නේ කෙසේද?
Add-ADGroupMember "Powershell Guru" -Members powershellguru

PowerShell සමග ක්රියාකාරී නාමාවලිය පිරිසක් සිට පරිශීලක ඉවත් කරන්නේ කොහොමද?
Remove-ADGroupMember 'Powershell Guru' -Members powershellguru

PowerShell සමග ක්රියාකාරී නාමාවලිය (කිසිදු සාමාජිකයන් සමග), හිස් කණ්ඩායම් සොයා ගන්නේ කෙසේද?
Get-ADGroup -Filter * -Properties Members | Where-Object -FilterScript {-not $_.Members}

PowerShell සමග ක්රියාකාරී නාමාවලිය (කිසිදු සාමාජිකයන් සමග), හිස් කණ්ඩායම් ගණන් ගන්නේ කෙසේද?
(Get-ADGroup -Filter * -Properties Members | Where-Object -FilterScript {-not $_.Members}).Count

PowerShell සමග ක්රියාකාරී නාමාවලිය පිරිසක් සාමාජිකයන් ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ආවර්තනික සාමාජිකයන් සමග පිරිසක් සාමාජිකයන් ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ආවර්තනික සාමාජිකයන් තොරව / සමග කණ්ඩායමේ සාමාජිකයින් සංඛ්යාව ගණන් ගන්නේ කෙසේද?

Users

PowerShell සමග ක්රියාකාරී නාමාවලිය “ලබා ගන්න-ADUser ‘යන පෙරහන b වෙනුවට භාවිතා කළ හැක්කේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය තවත් ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය සඳහා පරිශීලක යාමට කෙසේද?
Move-ADObject -Identity $dn -TargetPath 'OU=myOU,DC=domain,DC=com'

PowerShell සමග පරිශීලක සඳහා (පිලිතුරු කැදැලි ආකාරයෙන් සංදර්ශනය කරන්න) සිටින සියලුම සාමාජිකයන් සොයා ගන්නේ කෙසේද?
Get-ADGroup -LDAPFilter "(member:1.2.840.113556.1.4.1941:=$($dn))"

PowerShell සමග පරිශීලක සඳහා සාමාජිකයින් (කෙටි නම / සීමාව අකුරු) ලබා ගන්නේ කෙසේද?
(Get-ADUser $user -Properties MemberOf).MemberOf | ForEach-Object -Process {($_ -split ',')[0].Substring(3)} | Sort-Object

PowerShell සමග ක්රියාකාරී නාමාවලිය පරිශීලක ගිණුමක් සඳහා, (DisplayName), නම (සම්පූර්ණ නම) නම වෙනස් GivenName (FirstName), සහ වාසගම (LastName) කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් සඳහා විස්තරය, කාර්යාලය, සහ දුරකථන අංකය වෙනස් කරන්නේ කෙසේද?
Set-ADUser $samAccountName -Description 'IT Consultant' -Office 'Building B' -OfficePhone '12345'

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් සඳහා “31/12/2015” හෝ “කිසිදා” වෙත කල් ඉකුත් දිනයක් කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් unlock කෙසේද?
Unlock-ADAccount $samAccountName

සක්රිය කරන ආකාරය / PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් අක්රීය?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් ඉවත් කරන්නේ කොහොමද?
Remove-ADUser $samAccountName

PowerShell සමග ක්රියාකාරී නාමාවලිය එක් පරිශීලක ගිණුම සඳහා මුරපදය නැවත සකස් කරන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය කිහිපයක් පරිශීලක ගිණුම් (තොග) සඳහා මුරපදය නැවත සකස් කරන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගොනු හිමිකරු සොයා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය තුළ පරිශීලක සඳහා ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය (සංවිධාන ඒකක) සොයා ගන්නේ කෙසේද?
[regex]::match("$((Get-ADUser $user -Properties DistinguishedName).DistinguishedName)",'(?=OU=)(.*\n?)').value

PowerShell සමග ක්රියාකාරී නාමාවලිය ආබාධිත පරිශීලක ගිණුම් සොයා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය කල් ඉකුත් වූ පරිශීලක ගිණුම් සොයා ගන්නේ කෙසේද?
Search-ADAccount -AccountExpired

PowerShell සමග ක්රියාකාරී නාමාවලිය හැමදෙයකටම පරිශීලක ගිණුම් සොයා ගන්නේ කෙසේද?
Search-ADAccount -LockedOut

PowerShell සමග ක්රියාකාරී නාමාවලිය පරිශීලක ගිණුමේ Sid සොයා ගන්නේ කෙසේද?
(Get-ADUser $user -Properties SID).SID.Value

PowerShell සමග ක්රියාකාරී නාමාවලිය Sid කිරීමට පරිශීලක නාමය පරිවර්තනය කරන්නේ කෙසේ ද?

PowerShell සමග ක්රියාකාරී නාමාවලිය පරිශීලක නාමය වෙත Sid පරිවර්තනය කරන්නේ කෙසේ ද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් සම්භාවනීය නම භේද කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් නිර්මාණය / වෙනස් කළ දිනය සොයා ගන්නේ කෙසේද?
Get-ADUser -Identity $user -Properties whenChanged, whenCreated | Format-List -Property whenChanged, whenCreated

PowerShell සමග ක්රියාකාරී නාමාවලිය පන්ති “පරිශීලක” සඳහා විකල්ප සහ අනිවාර්ය ගුණ ප්රදර්ශනය කිරීම කොහොමද?

PowerShell සමග ක්රියාකාරී නාමාවලිය තුළ පරිශීලක සඳහා යුතු LDAP මාර්ගය ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය තුළ පරිශීලකයාගේ එන් (කැනොනිකල් නම) වෙනස් කිරීමට කෙසේද?
Rename-ADObject $((Get-ADUser $user -Properties DistinguishedName).DistinguishedName) -NewName 'Test Powershell'

PowerShell සමග ක්රියාකාරී නාමාවලිය දී ආයතනික ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) පරිශීලක මව් ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය (WHO ගිණුම නිර්මාණය) පරිශීලක හිමිකරු ලබා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය තුළ පරිශීලකයාගේ PwdLastSet ගුණාංගය පරිවර්තනය කරන්නේ කෙසේ ද?

Computers

PowerShell සමග දේශීය පරිගණක සහ වසම අතර ආරක්ෂිත නාලිකාව පරීක්ෂා කරන්නේ කෙසේද?
Test-ComputerSecureChannel

PowerShell සමග දේශීය පරිගණක සහ වසම අතර ආරක්ෂිත නාලිකාව අලුත්වැඩියා කිරීමට කෙසේද?
Test-ComputerSecureChannel -Repair

PowerShell සමග ක්රියාකාරී නාමාවලිය පරිගණක ගිණුමක් අක්රීය කිරීමට කෙසේද?
Disable-ADAccount $computer

PowerShell සමග ක්රියාකාරී නාමාවලිය නිශ්චිත මෙහෙයුම් පද්ධති සමග පරිගණක සොයා ගන්නේ කෙසේද?

Organizational Unit (OU)

PowerShell සමග ක්රියාකාරී නාමාවලිය දී ආයතනික ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) නිර්මාණය කරන්නේ කෙසේ ද?
New-ADOrganizationalUnit -Name 'TEST' -Path 'DC=domain,DC=com'

PowerShell සමග ක්රියාකාරී නාමාවලිය සංවිධාන ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) විස්තර ලබා ගන්නේ කෙසේද?
Get-ADOrganizationalUnit 'OU=TEST,DC=domain,DC=com' -Properties *

PowerShell සමග ක්රියාකාරී නාමාවලිය දී ආයතනික ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) විස්තරය වෙනස් කළ හැක්කේ කෙසේද?
Set-ADOrganizationalUnit 'OU=TEST,DC=domain,DC=com' -Description 'My description'

සක්රිය කරන ආකාරය / PowerShell සමග ක්රියාකාරී නාමාවලිය අහම්බයක් මකා දැමීමට සිට ආයතනික ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) අක්රීය?

PowerShell සමග ක්රියාකාරී නාමාවලිය සියලු සංවිධාන ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) සඳහා හදිසි අනතුරු මකා දැමීමට සක්රිය කරන ආකාරය?

PowerShell සමග ක්රියාකාරී නාමාවලිය අහම්බයක් මකා දැමීමට ගෙන් සුරක්ෂිත සංවිධාන ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) මකා ගන්නේ කෙසේද?

PowerShell සමග ක්රියාකාරී නාමාවලිය කැනොනිකල් නම කිරීමට සංවිධාන ඒකකය (ඔක්ස්ෆර්ඩ් සංගමයේ දේශනය) ක කීර්තිමත් නම පරිවර්තනය කරන්නේ කෙසේ ද?

PowerShell සමඟ හිස් සංවිධාන ඒකක (OUs) ලැයිස්තු ගත කිරීම සඳහා කෙසේද?

PowerShell සමග කණ්ඩායමේ කළමනාකරු ලබා ගන්නේ කෙසේද?
(Get-ADGroup $dn -Properties Managedby).Managedby

Up


Regex (Regular Expression)

PowerShell සමග Regex සමග IP ලිපිනය v4 (80.80.228.8) උපුටා ගැනීම කෙසේද?
$example = 'The IP address is 80.80.228.8'
$ip = [regex]::match($example,'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b').value

වෙන්කර සමග MAC ලිපින (C0 දක්වා-D9-62-39-61-2D) උපුටා ගැනීම කෙසේද “-” Regex සමග PowerShell සමග?
$example = 'The MAC address is C0-D9-62-39-61-2D'
$mac = [regex]::match($example,'([0-9A-F]{2}[-]){5}([0-9A-F]{2})').value

“:” Regex සමග PowerShell සමග වෙන්කර සමඟ? (2D: D9: 39::: 61 62 C0 දක්වා) ලිපිනය මැක් උපුටා ගන්නේ කෙසේද
$example = 'The MAC address is C0:D9:62:39:61:2D'
$mac = [regex]::match($example,'((\d|([a-f]|[A-F])){2}:){5}(\d|([a-f]|[A-F])){2}').value

PowerShell සමග Regex සමග දිනය (10/02/2015) උපුටා ගැනීම කෙසේද?
$example = 'The date is 10/02/2015'
$date = [regex]::match($example,'(\d{2}\/\d{2}\/\d{4})').value

PowerShell සමග Regex සමග URL (www.powershell-guru.com) උපුටා ගැනීම කෙසේද?
$example = 'The URL is www.powershell-guru.com'
$url = [regex]::match($example,'[a-z]+[:.].*?(?=\s)').value

PowerShell සමග Regex සහිත ඊ (user@domain.com) උපුටා ගැනීම කෙසේද?
$example = 'The email is user@domain.com'
$email = [regex]::match($example,'(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b').value

PowerShell සමග Regex සමග සංගීත උදාහරණයක් සිට “ගුරු” උපුටා ගැනීම කෙසේද?
$example = 'www.powershell-guru.com'
[regex]::match($example,'(?<=-)(.*\n?)(?=.com)').value

PowerShell සමග Regex සමග සංගීත උදාහරණයක් සිට “guru.com” උපුටා ගැනීම කෙසේද?
$example = 'www.powershell-guru.com'
[regex]::match($example,'(?<=-)(.*\n?)(?<=.)').value

PowerShell සමග Regex සමග සංගීත උදාහරණයක් සිට “powershell-guru.com” උපුටා ගැනීම කෙසේද?
$example = 'www.powershell-guru.com'
[regex]::match($example,'(?<=www.)(.*\n?)').value

PowerShell සමග Regex සමග සංගීත උදාහරණයක් සිට “123” උපුටා ගැනීම කෙසේද?
$example = 'Powershell123'
[regex]::match($example,'(\d+)').value

PowerShell සමග Regex සමග සංගීත උදාහරණයක් සිට “$” (ඩොලර් ලකුණක්) උපුටා ගැනීම කෙසේද?
$example = 'Powershell`$123'
[regex]::match($example,'(\$)').value

PowerShell සමග Regex සමග සංගීත තවත් (* .fr) සමග චරිතය (* .com) වෙනුවට කෙසේද?
$example = 'www.powershell-guru.com'
[regex]::Replace($example, '.com','.fr')

PowerShell සමග Regex සමග සංගීත පැන යාමට කෙසේද?
[regex]::Escape('\\server\share')

Up


Memory

PowerShell සමග කුණු එකතු විසින් මතකය එකතුවක් බල කෙසේද?
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()

PowerShell සමඟ පරිගණකයේ රැම් ප්රමාණය ලබා ගන්නේ කෙසේද?

Up


Date

PowerShell සමග වත්මන් දිනය ලබා ගන්නේ කෙසේද?
Get-Date
[Datetime]::Now

PowerShell සමග විවිධ ආකෘති ලද දිනය කවෙර්ද ප්රදර්ශනය කිරීමට කෙසේද?

PowerShell සමග දිනය (සංගීත) ඔබ හට රිසි නම් දිනය (දිනයවේලාව) පරිවර්තනය කරන්නේ කෙසේ ද?
$datetimeToString = '{0:dd/MM/yy}' -f (Get-Date 30/01/2015)
$datetimeToString = (Get-Date 31/01/2015).ToShortDateString()

PowerShell සමග දිනය (දිනයවේලාව) ඔබ හට රිසි නම් දිනය (සංගීත) පරිවර්තනය කරන්නේ කෙසේ ද?
$stringToDatetime = [Datetime]::ParseExact('30/01/2015', 'dd/MM/yyyy', $null)

PowerShell දෙකක් දින අතර වෙනස (දින ගණන, පැය, විනාඩි, හෝ දෙවන) ගණනය කරන්නේ කෙසේද?
(New-TimeSpan -Start $dateStart -End $dateEnd).Days
(New-TimeSpan -Start $dateStart -End $dateEnd).Hours
(New-TimeSpan -Start $dateStart -End $dateEnd).Minutes
(New-TimeSpan -Start $dateStart -End $dateEnd).Seconds

PowerShell දෙකක් දින සංසන්දනය කළ හැක්කේ කෙසේද?
(Get-Date 2015-01-01) -lt (Get-Date 2015-01-30) # True
(Get-Date 2015-01-01) -gt (Get-Date 2015-01-30) # False

PowerShell සමග “දිනයවේලාව” ලෙස දිනයන් රැසක් නිරාකරණය කළ හැක්කේ කෙසේද?
$arrayDate | Sort-Object -Property {$_ -as [Datetime]}

PowerShell සමග stopwatch ආරම්භ කිරීමට හෝ නවතා කෙසේද?
$chrono = [Diagnostics.Stopwatch]::StartNew()
$chrono.Stop()
$chrono

PowerShell සමග සතියේ අද දිනය ලබා ගන්නේ කෙසේද?
(Get-Date).DayOfWeek #Sunday

PowerShell සමග ඊයේ දිනය ලබා ගන්නේ කෙසේද?
(Get-Date).AddDays(-1)

PowerShell සමග (පෙබරවාරි 2015) මාසය දින ගණන ලබා ගන්නේ කෙසේද?
[DateTime]::DaysInMonth(2015, 2)

PowerShell සමග අධික අවුරුද්ද දැන ගන්නේ කෙසේද?
[DateTime]::IsLeapYear(2015)

PowerShell සමග කාලය කලාප ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
[System.TimeZoneInfo]::GetSystemTimeZones()

Up


Networking

(ASCII රාමුවට දක්වා) කේතාංකනය හා PowerShell සමග URL එකක් විකේතනය කෙසේද?

PowerShell සමග දේශීය ජාලය විධාන ද සමාන මොනවාද?

PowerShell සමග IP ලිපිනයන් ලබා ගන්නේ කෙසේද?
Get-NetIPAddress # Windows 8.1 & Windows 2012
Get-NetIPConfiguration # Windows 8.1 & Windows 2012

PowerShell සමග IP ලිපිනය v6 සංස්කරණයක් (IPv6) අක්රීය කිරීමට කෙසේද?

PowerShell සමග IP ලිපිනය v4 (IPv4 හි) තහවුරු කරන්නේ කෙසේද?
if([ipaddress]'10.0.0.1'){'validated'}

PowerShell සමඟ බාහිර IP ලිපිනය සොයා ගන්නේ කෙසේද?

PowerShell සමග IP ලිපිනය සිට සත්කාරක නාමය සොයා ගන්නේ කෙසේද?
([System.Net.Dns]::GetHostEntry($IP)).Hostname

PowerShell සමග ධාරක නාමය සිට IP ලිපිනය සොයා ගන්නේ කෙසේද?
([System.Net.Dns]::GetHostAddresses($computer)).IPAddressToString

PowerShell සමග ධාරක නාමය සිට FQDN සොයා ගන්නේ කෙසේද?
[System.Net.Dns]::GetHostByName($computer).HostName

PowerShell සමග ජාල සැකසුම් (අයිපී, සබ්නෙට්, ගේට්වේ, සහ DNS) සොයා ගන්නේ කෙසේද?

PowerShell සමග MAC ලිපින සොයා ගන්නේ කෙසේද?
Get-CimInstance win32_networkadapterconfiguration | Select-Object -Property Description, Macaddress
Get-WmiObject -Class win32_networkadapterconfiguration | Select-Object -Property Description, Macaddress

PowerShell සමඟ පරිගණකය පිං ගන්නේ කෙසේද?

පරිගණක PowerShell සමග අන්තර්ජාලය හා සම්බන්ධ නම් පරීක්ෂා කරන්නේ කෙසේද?

PowerShell සමග වෙබ් අඩවියක් සඳහා “කවුරුන්ද” විමසුම් ඉටු කරන්නේ කෙසේද?
$whois = New-WebServiceProxy 'http://www.webservicex.net/whois.asmx?WSDL'
$whois.GetWhoIs('powershell-guru.com')

PowerShell සමඟ පොදු IP (ඉන්නා තැන) පිළිබඳ විස්තර ලබා ගන්නේ කෙසේද?

වරාය PowerShell සමග වසා / විවෘත වන්නේ නම් පරීක්ෂා කරන්නේ කෙසේද?
New-Object -TypeName Net.Sockets.TcpClient -ArgumentList $computer, 135

PowerShell සමග “tracert” ඉටු කිරීම සඳහා කෙසේද?
Test-NetConnection www.google.com -TraceRoute

PowerShell සමග ගෙදර ජාල සම්බන්ධතා පැතිකඩ විසින් අදාල කරුණ නිවැරදි කිරීමට කෙසේද?
Get-NetAdapter | Format-Table -Property Name, InterfaceDescription, ifIndex -AutoSize # Windows 8.1
Set-NetConnectionProfile -InterfaceIndex 6 -NetworkCategory Private

PowerShell සමග, ජය වරාය සම්බන්ධතා පෙන්වන්න කෙසේද?
netstat.exe -ano
Get-NetTCPConnection #Windows 8 and 2012

PowerShell සමග ඉතා කුඩා URL එක බවට දිගු URL එක කෙටි කර ගන්නේ කෙසේද?
$url = 'www.powershell-guru.com'
$tiny = Invoke-RestMethod -Uri "http://tinyurl.com/api-create.php?url=$url"

PowerShell සමග ප්රොක්සි සේවාදායකයේ සැකසුම් ලබා ගන්නේ කෙසේද?
Get-ItemProperty -Path HKCU:"Software\Microsoft\Windows\CurrentVersion\Internet Settings"

DNS

PowerShell සමග දේශීය පරිගණකයේ DNS ඒ පූර්වාපේක්ෂි පරීක්ෂා කරන්නේ කෙසේද?
ipconfig.exe /displaydns
Get-DnsClientCache #Windows 8 and 2012

PowerShell සමග දේශීය පරිගණකය මත, DNS පූර්වාපේක්ෂි ඉවත් කරන්නේ කෙසේද?
ipconfig.exe /flushdns
Start-Process -FilePath ipconfig -ArgumentList /flushdns -WindowStyle Hidden
Clear-DnsClientCache #Windows 8 and 2012

PowerShell සමඟ දුරස්ථ පරිගණක මත, DNS පූර්වාපේක්ෂි ඉවත් කරන්නේ කෙසේද?
Invoke-Command -ScriptBlock {Clear-DnsClientCache} -ComputerName computer01, computer02

PowerShell සමග සත්කාරක ගොනුව කියවීමට කෙසේද?
Get-Content -Path 'C:\Windows\system32\drivers\etc\hosts'

Up


Password

PowerShell සමග අහඹු මුරපදය උත්පාදනය කිරීමට කෙසේද?
[Reflection.Assembly]::LoadWithPartialName('System.Web')
[System.Web.Security.Membership]::GeneratePassword(30,2)

PowerShell සමඟ දුරස්ථ සේවාදායකය මත පරිපාලක දේශීය මුරපදය වෙනස් කරන්නේ කෙසේද?
$admin = [ADSI]('WinNT://server01/administrator,user')
$admin.SetPassword($password)
$admin.SetInfo()

PowerShell සමග ක්රියාකාරී නාමාවලිය ගිණුමක් පිළිබඳ රහස් වචනය කල් ඉකුත් දිනය සොයා ගන්නේ කෙසේද?

Up


Printers

PowerShell සමඟ නිශ්චිත සේවාදායකය සඳහා සියලු මුද්රණ යන්ත්ර ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-WmiObject -Query 'Select * From Win32_Printer' -ComputerName $computer

PowerShell සමඟ නිශ්චිත සේවාදායකය සඳහා සියලු වරායන් ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-WmiObject -Class Win32_TCPIPPrinterPort -Namespace 'root\CIMV2' -ComputerName $computer

PowerShell සමග මුද්රණ යන්ත්රයක් වන අදහස් / ස්ථානය වෙනස් කළ හැක්කේ කෙසේද?

PowerShell සමග මුද්රණ යන්ත්රයක් (සියලුම රැකියා අවලංගු) පහකළ කෙසේද?
$printer = Get-WmiObject -Class win32_printer -Filter "Name='HP Deskjet 2540 series'"
$printer.CancelAllJobs()

PowerShell සමග මුද්රණ යන්ත්රයක් සඳහා පරීක්ෂණ පිටුව මුද්රණය කිරීමට කෙසේද?
$printer = Get-WmiObject -Class win32_printer -Filter "Name='HP Deskjet 2540 series'"
$printer.PrintTestPage()

PowerShell සමග මුද්රණ යන්ත්ර සඳහා මුද්රිත පෝලිම් ලබා ගන්නේ කෙසේද?

Up


Regedit

Read

PowerShell සමග ලේඛකාධිකාරය වද ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-ChildItem -Path Registry::

ලේඛකාධිකාරය වටිනාකම් සහ PowerShell සමග වටිනාකම වර්ග ලබා ගන්නේ කෙසේද?

PowerShell සමග ලේඛකාධිකාරය ප්රධාන subkeys ලැයිස්තු ගත කිරීම සඳහා කෙසේද?

PowerShell සමග ආවර්තනික ආකාරයකින් ලේඛකාධිකාරය ප්රධාන subkeys ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-ChildItem -Path 'HKLM:\SYSTEM' -Recurse -ErrorAction SilentlyContinue

PowerShell සමඟ නිශ්චිත නම subkeys සොයා ගන්නේ කෙසේද?
Get-ChildItem -Path 'HKLM:\SOFTWARE' -Include *Plugin* -Recurse -ErrorAction SilentlyContinue

PowerShell සමග වින්ඩෝස් ලේඛන subkeys නම පමණක් නැවත කෙසේද?
(Get-ChildItem -Path 'HKLM:\SYSTEM').Name # Return HKEY_LOCAL_MACHINE\SYSTEM\ControlSet
Get-ChildItem -Path 'HKLM:\SYSTEM' -Name # Return ControlSet

PowerShell සමග ලේඛකාධිකාරය වටිනාකම් ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'

PowerShell සමඟ නිශ්චිත ලේඛකාධිකාරය වටිනාකම කියවන්නේ කෙසේද?
(Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').ProductName

PowerShell සමඟ දුරස්ථ පරිගණකයේ විශේෂිත ලේඛකාධිකාරය වටිනාකම කියවන්නේ කෙසේද?

Write

PowerShell සමග නව ලේඛකාධිකාරය යතුරක් නිර්මාණය කරන්නේ කෙසේද?
New-Item -Path 'HKCU:\Software\MyApplication'

PowerShell සමග ලේඛකාධිකාරය වටිනාකමක් ගන්නේ කෙසේද?
New-ItemProperty -Path 'HKCU:\Software\MyApplication' -Name 'Version' -Value '1.0'

PowerShell සමග, දැනට පවතින ලේඛකාධිකාරය වටිනාකම වෙනස් කළ හැක්කේ කෙසේද?
Set-ItemProperty -Path 'HKCU:\Software\MyApplication' -Name 'Version' -Value '2.0'

Delete

PowerShell සමග ලේඛකාධිකාරය වටිනාකම ඉවත් කිරීමට කෙසේද?
Remove-ItemProperty -Path 'HKCU:\Software\MyApplication' -Name 'Version'

PowerShell සමග ලේඛකාධිකාරය යතුර මකා ගන්නේ කෙසේද?
Remove-Item -Path 'HKCU:\Software\MyApplication' -Force

Test

එය ලේඛකාධිකාරය ප්රධාන PowerShell සමග පවතී නම් පරීක්ෂා කරන්නේ කෙසේද?
Test-Path -Path 'HKCU:\Software\MyApplication'

එය ලේඛකාධිකාරය වටිනාකම PowerShell සමග පවතී නම් පරීක්ෂා කරන්නේ කෙසේද?
(Get-Item -Path 'HKCU:\Software\MyApplication').GetValueNames() -contains 'Version'

Up


Strings

PowerShell සමග සංගීත ආරම්භයේ සිට සුදු හිස් අවකාශයක් ඉවත් කරන්නේ කොහොමද?
$string = ' PowershellGuru'
$string = $string.TrimStart()

PowerShell සමග සංගීත අවසානයේ සිට සුදු හිස් අවකාශයක් ඉවත් කරන්නේ කොහොමද?
$string = 'PowershellGuru '
$string = $string.TrimEnd()

PowerShell සමග සංගීත සුදු-හිස් අවකාශයක් (සහ අවසානය) ඉවත් කරන්නේ කොහොමද?
$string = ' PowershellGuru '
$string = $string.Trim()

PowerShell සමග ඉහළ නඩුව සඳහා සංගීත පරිවර්තනය කරන්නේ කෙසේ ද?
$string = 'powershellguru'
$string = $string.ToUpper()

PowerShell සමග අඩු නඩුව වැලක් බවට පත් කරන්නේ කෙසේ ද?
$string = 'POWERSHELLGURU'
$string = $string.ToLower()

වැල යන substring “PowerShell” තෝරා ගන්නේ කෙසේද PowerShell සමග “PowerShellGuru”?
$string.Substring(0,10)

PowerShell සමග සංගීත “PowerShellGuru” වල “ගුරු” යන substring තෝරා ගන්නේ කෙසේද?
$string.Substring(10)

PowerShell සමග “PowerShell123Guru” සංඛ්යාව “123” තෝරා ගන්නේ කෙසේද?
$string = 'Powershell123Guru'
[regex]::match($string,'(\d+)').value

PowerShell සමග සංගීත වන “ගුරු” “PowerShellGuru” ශුන්ය මත පදනම් දර්ශකය ලබා ගන්නේ කෙසේද?
$string.IndexOf('Guru') # 10

වැලක් PowerShell සමග ශුන්ය හෝ හිස් නම් පරීක්ෂා කරන්නේ කෙසේද?
$string = $null
$string = ''
[string]::IsNullOrEmpty($string)

වැලක්, හිස් NULL වේ, හෝ PowerShell සහිත සුදු-හිස් අවකාශයක් පමණක් සමන්විත නම් පරීක්ෂා කරන්නේ කෙසේද?
$string = $null
$string = ''
$string = ' '
[string]::IsNullOrWhiteSpace($string)

වැලක් PowerShell සමග විශේෂිත ලිපිය අඩංගු නම් පරීක්ෂා කරන්නේ කෙසේද?
$string = 'PowershellGuru'
$string.Contains('s')
[regex]::match($string,'s').Success

PowerShell සමග සංගීත දිග ආපසු ගන්නේ කෙසේද?
$string.Length

PowerShell සමග යෙදූ concatenate කෙසේද?

PowerShell සමග සංගීත දී “[]” එකක් හෝ කිහිපයක් වරහන් සඳහා ගැලපෙන කෙසේද?
$string = '[PowershellGuru]'
$string -match '\[' # Only 1
$string -match '\[(.*)\]' # Several

PowerShell සමග සංගීත එකක් හෝ කිහිපයක් වරහන් “()” සඳහා ගැලපෙන කෙසේද?
$string = '(PowershellGuru)'
$string -match '\(' # Only 1
$string -match '\((.*)\)' # Several

PowerShell සමග සංගීත එකක් හෝ කිහිපයක් සඟල වරහන් “{}” සඳහා ගැලපෙන කෙසේද?
$string = '{PowershellGuru}'
$string -match '\{' # Only 1
$string -match '\{(.*)\}' # Several

එකක් හෝ PowerShell සමග සංගීත කිහිපයක් කෝණය වරහන් “<>” සඳහා ගැලපෙන කෙසේද?
$string = ''
$string -match '\<' # Only 1
$string -match "\<(.*)\>" # Several

PowerShell සමග සංගීත ඕනෑම සිම්පල් අකුරු (ABC) ගැලපෙන කෙසේද?
$string = 'POWERSHELLGURU'
$string -cmatch "^[a-z]*$" #False

PowerShell සමග සංගීත ඕනෑම upperletters (ඒබීසී) ගැලපෙන කෙසේද?
$string = 'powershellguru'
$string -cmatch "^[A-Z]*$" #False

PowerShell සමග සංගීත දී “[P” (පි සිම්පල්) ගැලපෙන කෙසේද?
$string = '[powershellGuru]'
$string -cmatch '\[[a-z]\w+' #True

PowerShell සමග සංගීත දී “[පී” (පී ඉහළ යාමකදී) ගැලපෙන කෙසේද?
$string = '[PowershellGuru]'
$string -cmatch '\[[A-Z]\w+' #True

PowerShell තවත් රේඛාව සමඟ රේඛාවක් වෙනුවට කෙසේද?
$a = 'Line A'
$b = 'Line B'
$a = $a -replace $a, $b

PowerShell සමග සංගීත (ප්රතිශතයක්) වෙත බෙදීමක් ක්රියාත්මක පරිවර්තනය කරන්නේ කෙසේ ද?
(1/2).ToString('P')

PowerShell සමඟ අංක අඩංගු නූල් නිරාකරණය කළ හැක්කේ කෙසේද?

PowerShell සමඟ දඬුවම අවසන් වචනය තෝරා ගන්නේ කෙසේද?
$sentence = 'My name is Test Powershell'
$sentence.Split(' ')[-1] # Returns Powershell

PowerShell සමඟ දඬුවම විශාලතම වචනය ලබා ගන්නේ කෙසේද?
$sentence = 'My name is Test Powershell'
$sentence.Split(' ') | Sort-Object -Property Length | Select-Object -Last 1 # Returns Powershell

වාර ගණන වැලක් ගණන් ගන්නේ කෙසේද PowerShell සමඟ දඬුවම තුල වර්තමාන වන්නේ ඇයි?
$sentence = 'test test test Powershell'
[regex]::Matches($sentence, 'test').Count # Returns 3

PowerShell සමග චරිතයක් අරාවට වැලක් එක් එක් චරිත පිටපත් කිරීමට කෙසේද?

PowerShell සමග සංගීත වන අකුරු වෙත පළමු ලිපිය පරිවර්තනය කළ හැක්කේ කෙසේද?

කොහොමද PowerShell සමග ලෑල්ලක් (වමේ හෝ දකුණේ) සංගීත ද?

PowerShell සමග Base64 කිරීමට සංගීත කේතාංකනය හා විකේතනය කෙසේද?

PowerShell සමඟ අංකය (යාමට සහ එහි සිට) ද්වීමය බවට පරිවර්තනය කරන්නේ කෙසේ ද?

PowerShell සමග මාර්ගය පමණක් පසුගිය මව් ෆෝල්ඩරය නැවත කෙසේද?

PowerShell සමග මාර්ගය පමණක් පසුගිය අයිතිමය කෙසේද?

Up


Math

PowerShell සමග System.Math පන්තියේ ක්රම ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
[System.Math] | Get-Member -Static -MemberType Method

PowerShell සමග නිරපේක්ෂ අගය නැවත කෙසේද?
[Math]::Abs(-12) #Returns 12
[Math]::Abs(-12.5) # Returns 12.5

කාගේ සයින් PowerShell සමග දක්වා ඇති සංඛ්යාව කෝණය ආපසු ගන්නේ කෙසේද?
[Math]::ASin(1) #Returns 1,5707963267949

PowerShell සමග සිවිලිම වටිනාකම ආපසු ගන්නේ කෙසේද?
[Math]::Ceiling(1.4) #Returns 2
[Math]::Ceiling(1.9) #Returns 2

PowerShell සමග බිම වටිනාකම ආපසු ගන්නේ කෙසේද?
[Math]::Floor(1.4) #Returns 1
[Math]::Floor(1.9) #Returns 1

PowerShell සහිත ව නිශ්චිත සංඛ්යාව ස්වභාවික (පදනම් ඉ) ලඝුගණක ආපසු ගන්නේ කෙසේද?
[Math]::Log(4) #Returns 1,38629436111989

PowerShell සහිත ව නිශ්චිත සංඛ්යාව 10 පාදයේ ලඝුගණක ආපසු ගන්නේ කෙසේද?
[Math]::Log10(4) #Returns 0,602059991327962

PowerShell දෙකක් වටිනාකම් උපරිම නැවත කෙසේද?
[Math]::Max(2,4) #Returns 4
[Math]::Max(-2,-4) #Returns -2

PowerShell දෙකක් වටිනාකම් අවම ආපසු ගන්නේ කෙසේද?
[Math]::Min(2,4) #Returns 2
[Math]::Max(-2,-4) #Returns -4

PowerShell සහිත ව නිශ්චිත බලයට ඇසූ අංකය ආපසු ගන්නේ කෙසේද?
[Math]::Pow(2,4) #Returns 16

PowerShell සමග ළඟම ඇති අත්යන්ත අගය සඳහා දශම අගය නැවත කෙසේද?
[Math]::Round(3.111,2) #Returns 3,11
[Math]::Round(3.999,2) #Returns 4

PowerShell සහිත ව නිශ්චිත දශම සංඛ්යාව අංගයක් ආපසු ගන්නේ කෙසේද?
[Math]::Truncate(3.111) #Returns 3
[Math]::Truncate(3.999) #Returns 3

PowerShell සහිත ව නිශ්චිත සංඛ්යාව වර්ග මූල ආපසු ගන්නේ කෙසේද?
[Math]::Sqrt(16) #Returns 4

PowerShell සමග පයි නිරන්තර පැමිණීමට කෙසේද?
[Math]::Pi #Returns 3,14159265358979

PowerShell සමග ස්වභාවික කරන්නාට පදනම (නියත ඉ) නැවත කෙසේද?
[Math]::E #Returns 2,71828182845905

ගණනාවක් PowerShell පවා හෝ ඔත්තේ නම් පරීක්ෂා කරන්නේ කෙසේද?
[bool]($number%2)

Up


Hashtables

PowerShell සමඟ හිස් hashtable නිර්මාණය කරන්නේ කෙසේද?
$hashtable = @{}
$hashtable = New-Object -TypeName System.Collections.Hashtable

PowerShell සමග අයිතම සමග hashtable නිර්මාණය කරන්නේ කෙසේද?

PowerShell සමග අයිතම සමග ප්රධාන / නාමය (නියෝග ශබ්ද කෝෂය) පිළිවෙල ඉතා hashtable නිර්මාණය කරන්නේ කෙසේද?

PowerShell සමග hashtable ද්රව්ය (යතුරු-වටිනාකම යුගල) එකතු කරන්නේ කෙසේද?
$hashtable.Add('Key3', 'Value3')

PowerShell සමග hashtable නිශ්චිත වටිනාකම ලබා ගන්නේ කෙසේද?
$hashtable.Key1
$hashtable.Get_Item('Key1')

PowerShell සමග hashtable අවම අගය ලබා ගන්නේ කෙසේද?

PowerShell සමග hashtable උපරිම වටිනාකම ලබා ගන්නේ කෙසේද?

PowerShell සමග hashtable අයිතමයන් වෙනස් කළ හැක්කේ කෙසේද?
$hashtable.Set_Item('Key1', 'Value1Updated')

PowerShell සමග hashtable අයිතමයන් ඉවත් කරන්නේ කොහොමද?
$hashtable.Remove('Key1')

PowerShell සමග hashtable ඉවත් කරන්නේ කෙසේද?
$hashtable.Clear()

PowerShell සමග hashtable තුළ විශේෂිත ප්රධාන / වටිනාකම ඉදිරියේ පරීක්ෂා කරන්නේ කෙසේද?
$hashtable.ContainsKey('Key3')
$hashtable.ContainsValue('Value3')

PowerShell සමග hashtable ප්රධාන / වටිනාකම අනුව වර්ග කළ හැක්කේ කෙසේද?
$hashtable.GetEnumerator() | Sort-Object -Property Name
$hashtable.GetEnumerator() | Sort-Object -Property Value -Descending

Up


Arrays

PowerShell සමඟ හිස් අරාවක් නිර්මාණය කරන්නේ කෙසේද?
$array = @()
$array = [System.Collections.ArrayList]@()

PowerShell සමග භාණ්ඩ රැසක් නිර්මාණය කරන්නේ කෙසේද?
$array = @('A', 'B', 'C')
$array = 'A', 'B', 'C'
$array = 'a,b,c'.Split(',')
$array = .{$args} a b c
$array = echo a b c

PowerShell සමග අරාවට අයිතම එකතු කිරීමට කෙසේද?
$array += 'D'
[void]$array.Add('D')

PowerShell සමග රැසක් දී අයිතමය වෙනස් කළ හැක්කේ කෙසේද?
$array[0] = 'Z' # 1st item[0]

PowerShell සමග රැසක් ප්රමාණය පරීක්ෂා කරන්නේ කෙසේද?
$array = 'A', 'B', 'C'
$array.Length # Returns 3

PowerShell සමග රැසක් එක් අයිතමය / කිහිපයක් / සියළුම ලබා ගන්නේ කෙසේද?
$array = @('A', 'B', 'C')
$array[0] # One item (A)
$array[0] + $array[2] # Several items (A,C)
$array # All items (A,B,C)

PowerShell සමග රැසක් හිස් අයිතම ඉවත් කරන්නේ කොහොමද?
$array = @('A', 'B', 'C', '')
$array = $array.Split('',[System.StringSplitOptions]::RemoveEmptyEntries) | Sort-Object # A,B,C

භාණ්ඩයක් PowerShell සමග රැසක් තිබුනොත්, පරීක්ෂා කරන්නේ කෙසේද?
$array = @('A', 'B', 'C')
'A' | ForEach-Object -Process {$array.Contains($_)} # Returns True
'D' | ForEach-Object -Process {$array.Contains($_)} # Returns False

PowerShell සමග සැරසී භාණ්ඩයක දර්ශක අංකය සොයා ගන්නේ කෙසේද?
$array = @('A', 'B', 'C')
[array]::IndexOf($array,'A') # Returns 0

PowerShell සමග රැසක් අයිතමයන් න්යාය ආපසු හැරවීමට කෙසේද?
$array = @('A', 'B', 'C')
[array]::Reverse($array) # C,B,A

PowerShell සමග රැසක් සිට අහඹු අයිතමය උත්පාදනය කිරීමට කෙසේද?
$array | Get-Random

PowerShell සමග ආරෝහණ / ජාතකය ආකාරයකින් රැසක් නිරාකරණය කළ හැක්කේ කෙසේද?
$array = @('A', 'B', 'C')
$array | Sort-Object # A,B,C
$array | Sort-Object -Descending # C,B,A

PowerShell සමග රැසක් අයිතමයන් ගණන ගණන් ගන්නේ කෙසේද?
$array.Count

PowerShell සමග තවත් රැසක් එකතු කරන්නේ කෙසේද?
$array1 = 'A', 'B', 'C'
$array2 = 'D', 'E', 'F'
$array3 = $array1 + $array2 # A,B,C,D,E,F

PowerShell සමග රැසක් සිට අනුපිටපත් සොයා ගන්නේ කෙසේද?
$array = 'A', 'B', 'C', 'C'
($array | Group-Object | Where-Object -FilterScript {$_.Count -gt 1}).Values # Returns C

PowerShell සමග රැසක් සිට අනුපිටපත් ඉවත් කරන්නේ කොහොමද?
$array = 'A', 'B', 'C', 'C'
$array = $array | Select-Object -Unique
$array # Returns A,B,C

PowerShell සමග උපසර්ගය (“user01”, “user02” … “user10”) සමඟ ආරම්භ වන භාණ්ඩ රැසක් නිර්මාණය කරන්නේ කෙසේද?
$array = 1..10 | ForEach-Object -Process { "user$_" }

Up


ACL

PowerShell සමග ක්රි.ව පරිශීලකයාගේ ACL හි ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
(Get-Acl -Path "AD:\$dn").Access

PowerShell සමග ෆෝල්ඩරයේ ACL හි ලැයිස්තු ගත කිරීම සඳහා කෙසේද?
(Get-Acl -Path C:\scripts).Access

PowerShell සමග ක්රි.ව පරිශීලක විශේෂිත ලෙසින් ACL අවසර ඇතුළත් කිරීම් (පරිශීලකයන් හෝ කණ්ඩායම්) ලැයිස්තු ගත කිරීම සඳහා කෙසේද?

Up


Variables

PowerShell සමග වඩාත් පොදු දත්ත වර්ග මොනවාද?

PowerShell සමග යම් ආකාරයක විචල්යයන් සඳහා වන අවම සහ උපරිම අගයන් සොයා ගන්නේ කෙසේද?