PDA

توجه ! این یک نسخه آرشیو شده می باشد و در این حالت شما عکسی را مشاهده نمی کنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : Windows PowerShell چیست ؟



Borna66
02-09-2012, 01:54 PM
ویندوز پاورشل آی.اس.ئی برنامه میزبان پاورشل است. به کمک آن، سرپرست سیستم قادر خواهد بود تا دستورات را اجرا کند و اسکریپت های اشکال زدایی را در یک رابط کاربر گرافیکی تست و ایرادیابی کند.
چرا به آن نیاز داریم: با انجام اعمالی بر اساس اسکریپت، این ابزار به ما این امکان را میدهد تا کنترل و انعطاف بیشتری در کار با زیرساخت ویندوز خود نسبت به حالت گرافیکی در کاربردهایی مانند Server Manager داشته باشیم. چگونه کار میکند: پاورشل آی.اس.ئی دقیقاً مانند پاورشل کار میکند. این ابزار راهکاری ساده تر برای ویرایش و ایرادیابی متنی است. قابلیت های آن شامل ویرایش چند خطی، زبانه دار بودن، رنگ بندی، راهنمای حساس به محتویات و … است

مایکروسافت تلاش کرده با powershell یک سطر فرمان قدرتمند را در اختیار کاربران خود بگذارد. قرار است powershell بطور استاندارد به نگارش های بعدی ویندوز اضافه گردد. اصلی ترین ویژگی های powershell عبارتند از اینکه این رابط یک شئ (objects) است و نه محیطی برپایه متن. همه آن چیزی که بر روی صفحه تصویر دیده میشود درون این برنامه بر قالب شئ هستند که دارای ها (properties) روش (methods) هایی دارند. دسترسی به این شی ها و ویرایش کردن آنها در مقایسه با حالت متنی بسیار ساده تر است.
An A-Z Index of Windows PowerShell commands

a
Get-Acl (http://ss64.com/ps/get-acl.html) Get permission settings for a file or registry key
Set-Acl (http://ss64.com/ps/set-acl.html) Set permissions
Get-Alias (http://ss64.com/ps/get-alias.html) gal Return alias names for Cmdlets
Import-Alias (http://ss64.com/ps/import-alias.html) ipal Import an alias list from a file
New-Alias (http://ss64.com/ps/new-alias.html) nal Create a new alias.
Set-Alias (http://ss64.com/ps/set-alias.html) sal Create or change an alias
Get-AuthenticodeSignature (http://ss64.com/ps/get-authenticodesignature.html) Get the signature object associated with a file
Set-AuthenticodeSignature (http://ss64.com/ps/set-authenticodesignature.html) Place a signature in a .ps1 script or other file
c
Set-Location (http://ss64.com/ps/set-location.html) cd/chdir/sl Set the current working location
Get-ChildItem (http://ss64.com/ps/get-childitem.html) dir/ls/gci Get child items (contents of a folder or registry key)
Get-Command (http://ss64.com/ps/get-command.html) gcm Retrieve basic information about a command
Measure-Command (http://ss64.com/ps/measure-command.html) Measure running time
Trace-Command (http://ss64.com/ps/trace-command.html) Trace an expression or command
Add-Content (http://ss64.com/ps/add-content.html) ac Add to the content of the item
Get-Content (http://ss64.com/ps/get-content.html) cat/type/gc Get content from item (specific location)
Set-Content (http://ss64.com/ps/set-content.html) sc Set content in the item (specific location)
Clear-Content (http://ss64.com/ps/clear-content.html) clc Remove content from a file/item
ConvertTo-Html (http://ss64.com/ps/convertto-html.html) Convert the input into an HTML table
ConvertFrom-SecureString (http://ss64.com/ps/convertfrom-securestring.html) Convert a secure string into an encrypted standard string
ConvertTo-SecureString (http://ss64.com/ps/convertto-securestring.html) Convert an encrypted standard string into a secure string
Clear-Host clear/cls Clear the screen
Clear-Item (http://ss64.com/ps/clear-item.html) cli Remove content from a variable or an alias
Copy-Item (http://ss64.com/ps/copy-item.html) copy/cp/cpi Copy an item from a namespace location
Get-Credential (http://ss64.com/ps/get-credential.html) Get a security credential (username/password)
Get-Culture (http://ss64.com/ps/get-culture.html) Get region information (language and keyboard layout)
d
Get-ChildItem (http://ss64.com/ps/get-childitem.html) dir/ls/gci Get child items (contents of a folder or registry key)
Get-Date (http://ss64.com/ps/get-date.html) Get current date and time
Set-Date (http://ss64.com/ps/set-date.html) Set system time on the host system
Remove-Item (http://ss64.com/ps/remove-item.html) del/erase/rd/rm/rmdir Remove an item
Do (http://ss64.com/ps/do.html) Loop while a condition is True
Get-PSDrive (http://ss64.com/ps/get-psdrive.html) gdr Get drive information (DriveInfo)
New-PSDrive (http://ss64.com/ps/new-psdrive.html) mount/ndr Install a new drive on the machine
Remove-PSDrive (http://ss64.com/ps/remove-psdrive.html) rdr Remove a provider/drive from its location
e
Get-Eventlog (http://ss64.com/ps/get-eventlog.html) Get eventlog data
Get-ExecutionPolicy (http://ss64.com/ps/get-executionpolicy.html) Get the execution policy for the shell
Set-ExecutionPolicy (http://ss64.com/ps/set-executionpolicy.html) Change the execution policy (user preference)
Export-Alias (http://ss64.com/ps/export-alias.html) epal Export an alias list to a file
Export-Clixml (http://ss64.com/ps/export-clixml.html) Produce a clixml representation of powershell objects
Export-Console (http://ss64.com/ps/export-console.html) Export console configuration to a file
Export-Csv (http://ss64.com/ps/export-csv.html) epcsv Export to Comma Separated Values (spreadsheet)
Invoke-Expression (http://ss64.com/ps/invoke-expression.html) Run a PowerShell expression
Exit Exit Powershell (or exit a script)
f
ForEach-Object (http://ss64.com/ps/foreach-object.html) foreach Loop for each object in the pipeline ( % )
ForEach (http://ss64.com/ps/foreach.html) Loop through values in the pipeline
For (http://ss64.com/ps/for.html) Loop through items that match a condition
Format-Custom (http://ss64.com/ps/format-custom.html) fc Format output using a customized view
Format-List (http://ss64.com/ps/format-list.html) fl Format output as a list of properties, each on a new line
Format-Table (http://ss64.com/ps/format-table.html) ft Format output as a table
Format-Wide (http://ss64.com/ps/format-wide.html) fw Format output as a table listing one property only
g
Get-Item (http://ss64.com/ps/get-item.html) gi Get a file/registry object (or any other namespace object)
Get-ChildItem (http://ss64.com/ps/get-childitem.html) dir/ls/gci Get child items (contents of a folder or registry key)
h
Get-Help (http://ss64.com/ps/get-help.html) help Open the help file
Add-History (http://ss64.com/ps/add-history.html) Add entries to the session history
Get-History (http://ss64.com/ps/get-history.html) history/h/ghy Get a listing of the session history
Invoke-History (http://ss64.com/ps/invoke-history.html) r/ihy Invoke a previously executed Cmdlet
Get-Host (http://ss64.com/ps/get-host.html) Get host information (PowerShell Version and Region)
Clear-Host clear/cls Clear the screen
Read-Host (http://ss64.com/ps/read-host.html) Read a line of input from the host console
Write-Host (http://ss64.com/ps/write-host.html) Display message on screen
i
if (http://ss64.com/ps/if.html) Conditionally perform a command
Import-Clixml (http://ss64.com/ps/import-clixml.html) Import a clixml file and rebuild the PS object
Import-Csv (http://ss64.com/ps/import-csv.html) ipcsv Take values from a CSV list and send objects down the pipeline.
Get-Item (http://ss64.com/ps/get-item.html) gi Get a file object or get a registry (or other namespace) object
Invoke-Item (http://ss64.com/ps/invoke-item.html) ii Invoke an executable or open a file (START)
New-Item (http://ss64.com/ps/new-item.html) ni Create a new item in a namespace
Remove-Item (http://ss64.com/ps/remove-item.html) rm/del/erase/rd/ri/rmdir Remove an item
Set-Item (http://ss64.com/ps/set-item.html) si Change the value of an item
Clear-ItemProperty (http://ss64.com/ps/clear-itemproperty.html) Delete the value of a property
Copy-ItemProperty (http://ss64.com/ps/copy-itemproperty.html) Copy a property along with its value
Get-ItemProperty (http://ss64.com/ps/get-itemproperty.html) Retrieve the properties of an object
Move-ItemProperty (http://ss64.com/ps/move-itemproperty.html) Move a property from one location to another
New-ItemProperty (http://ss64.com/ps/new-itemproperty.html) Set a new property of an item at a location
Remove-ItemProperty (http://ss64.com/ps/remove-itemproperty.html) Delete the property and its value from an item
Rename-ItemProperty (http://ss64.com/ps/rename-itemproperty.html) Rename a property of an item
Set-ItemProperty (http://ss64.com/ps/set-itemproperty.html) Set the value of a property
k
Stop-Process (http://ss64.com/ps/stop-process.html) kill/spps Stop a running process
l
Get-Location (http://ss64.com/ps/get-location.html) pwd / gl Get and display the current location
Pop-Location (http://ss64.com/ps/pop-location.html) popd Set the current working location from the stack
Push-Location (http://ss64.com/ps/push-location.html) pushd Push a location to the stack
Set-Location (http://ss64.com/ps/set-location.html) cd/chdir/sl Set the current working location
m
Add-Member (http://ss64.com/ps/add-member.html) Add a member to an instance of a PowerShell object
Get-Member (http://ss64.com/ps/get-member.html) gm Enumerate the properties of an object
Move-Item (http://ss64.com/ps/move-item.html) move/mv/mi Move an item from one location to another
o
Compare-Object (http://ss64.com/ps/compare-object.html) Compare the properties of objects
Group-Object (http://ss64.com/ps/group-object.html) group Group the objects that contain the same value for a common property
Measure-Object (http://ss64.com/ps/measure-object.html) Measure the properties of an object
New-Object (http://ss64.com/ps/new-object.html) Create a new .Net object
Select-Object (http://ss64.com/ps/select-object.html) select Select properties of objects
Sort-Object (http://ss64.com/ps/sort-object.html) sort Sort objects by property value
Where-Object (http://ss64.com/ps/where-object.html) Filter the objects passed along the command pipeline.
Out-Default (http://ss64.com/ps/out-default.html) Send output to default
Out-File (http://ss64.com/ps/out-file.html) Send command output to a file
Out-Host (http://ss64.com/ps/out-host.html) oh Send the pipelined output to the host
Out-Null (http://ss64.com/ps/out-null.html) Send output to null
Out-Printer (http://ss64.com/ps/out-printer.html) lp Send the output to a printer
Out-String (http://ss64.com/ps/out-string.html) Send objects to the host as strings
p
Powershell (http://ss64.com/ps/powershell.html) Launch a powershell session
Convert-Path (http://ss64.com/ps/convert-path.html) cvpa Convert a ps path to a provider path
Join-Path (http://ss64.com/ps/join-path.html) Combine a path and child-path
Resolve-Path (http://ss64.com/ps/resolve-path.html) rvpa Resolves the wildcards in a path
Split-Path (http://ss64.com/ps/split-path.html) Return part of a path
Test-Path (http://ss64.com/ps/test-path.html) Return true if the path exists, otherwise return false
Get-Pfxcertificate (http://ss64.com/ps/get-pfxcert.html) Get pfx certificate information
Pop-Location (http://ss64.com/ps/pop-location.html) popd Set the current working location from the stack
Push-Location (http://ss64.com/ps/push-location.html) pushd Push a location to the stack
Get-Process (http://ss64.com/ps/get-process.html) ps/gps Get a list of processes on a machine
Stop-Process (http://ss64.com/ps/stop-process.html) kill/spps Stop a running process
Clear-ItemProperty (http://ss64.com/ps/clear-itemproperty.html) clp Remove the property value from a property
Copy-ItemProperty (http://ss64.com/ps/copy-itemproperty.html) cpp Copy a property along with it's value
Get-ItemProperty (http://ss64.com/ps/get-itemproperty.html) gp Retrieve the properties of an object
Move-ItemProperty (http://ss64.com/ps/move-itemproperty.html) mp Move a property from one location to another
New-ItemProperty (http://ss64.com/ps/new-itemproperty.html) Set a new property
Remove-ItemProperty (http://ss64.com/ps/remove-itemproperty.html) rp Remove a property and its value
Rename-ItemProperty (http://ss64.com/ps/rename-itemproperty.html) rnp Renames a property at its location
Set-ItemProperty (http://ss64.com/ps/set-itemproperty.html) sp Set a property at the specified location to a specified value
Get-PsProvider (http://ss64.com/ps/get-psprovider.html) Get information for the specified provider
Set-PSdebug (http://ss64.com/ps/set-psdebug.html) Turn script debugging on or off
Add-PsSnapIn (http://ss64.com/ps/add-pssnapin.html) Add snap-ins to the console
Get-PsSnapin (http://ss64.com/ps/get-pssnapin.html) List PowerShell snap-ins on this computer
Remove-PSSnapin (http://ss64.com/ps/remove-pssnapin.html) Remove PowerShell snap-ins from the console
q
Quest AD cmdlets (http://ss64.com/ps/quest.html) Read and write to Active Directory
r
Read-Host (http://ss64.com/ps/read-host.html) Read a line of input from the host console
Remove-Item (http://ss64.com/ps/remove-item.html) rm/del/erase/rd/ri/rmdir Remove an item
Rename-Item (http://ss64.com/ps/rename-item.html) ren/rni Change the name of an existing item
Rename-ItemProperty (http://ss64.com/ps/rename-itemproperty.html) Rename a property of an item
Run/Call & Run a command (call operator)
s
Select-Object (http://ss64.com/ps/select-object.html) select Select properties of objects
Get-Service (http://ss64.com/ps/get-service.html) gsv Get a list of services
New-Service (http://ss64.com/ps/new-service.html) Create a new service
Restart-Service (http://ss64.com/ps/restart-service.html) Stop and then restart a service
Resume-Service (http://ss64.com/ps/resume-service.html) Resume a suspended service
Set-Service (http://ss64.com/ps/set-service.html) Change the start mode/properties of a service
Sort-Object (http://ss64.com/ps/sort-object.html) sort Sort objects by property value
Start-Service (http://ss64.com/ps/start-service.html) sasv Start a stopped service
Stop-Service (http://ss64.com/ps/stop-service.html) spsv Stop a running service
Suspend-Service (http://ss64.com/ps/suspend-service.html) Suspend a running service
Start-Sleep (http://ss64.com/ps/start-sleep.html) sleep Suspend shell, script, or runspace activity
Switch (http://ss64.com/ps/switch.html) Multiple if statements
Select-String (http://ss64.com/ps/select-string.html) Search through strings or files for patterns
t
Tee-Object (http://ss64.com/ps/tee-object.html) Send input objects to two places
New-Timespan (http://ss64.com/ps/new-timespan.html) Create a timespan object
Trace-Command (http://ss64.com/ps/trace-command.html) Trace an expression or command
Get-Tracesource (http://ss64.com/ps/get-tracesource.html) Get components that are instrumented for tracing.
Set-Tracesource (http://ss64.com/ps/set-tracesource.html) Trace a PowerShell component
Start-Transcript (http://ss64.com/ps/start-transcript.html) Start a transcript of a command shell session
Stop-Transcript (http://ss64.com/ps/stop-transcript.html) Stop the transcription process
u
Get-Uiculture (http://ss64.com/ps/get-uiculture.html) Get the ui culture information
Get-Unique (http://ss64.com/ps/get-unique.html) gu Get the unique items in a collection
Update-Formatdata (http://ss64.com/ps/update-formatdata.html) Update and append format data files
Update-Typedata (http://ss64.com/ps/update-typedata.html) Update the current extended type configuration
v
Clear-Variable (http://ss64.com/ps/clear-variable.html) clv Remove the value from a variable
Get-Variable (http://ss64.com/ps/get-variable.html) gv Get a powershell variable
New-Variable (http://ss64.com/ps/new-variable.html) nv Create a new variable
Remove-Variable (http://ss64.com/ps/remove-variable.html) rv Remove a variable and its value
Set-Variable (http://ss64.com/ps/set-variable.html) set/sv Set a variable and a value
w
Where-Object (http://ss64.com/ps/where-object.html) where Filter input from the pipeline ( ? )
Where (http://ss64.com/ps/where.html) Filter objects from the pipeline
While (http://ss64.com/ps/while.html) Loop while a condition is True
Get-WMIobject (http://ss64.com/ps/get-wmiobject.html) gwmi Get WMI class information
Write-Debug (http://ss64.com/ps/write-debug.html) Write a debug message to the host display
Write-Error (http://ss64.com/ps/write-error.html) Write an object to the error pipeline.
Write-Output (http://ss64.com/ps/write-output.html) echo Write an object to the pipeline
Write-Progress (http://ss64.com/ps/write-progress.html) Display a progress bar
Write-Verbose (http://ss64.com/ps/write-verbose.html) Write a string to the host's verbose display
Write-Warning (http://ss64.com/ps/write-warning.html) Write a warning message
# Comment / Remark
$variable = "value" Define a variable also: ${vari!ab#le} = "value"
@(...) Force an expression to be evaluated as a ListIn addition to the above, Powershell can also run all the standard XP commands (http://ss64.com/nt/) (apart from internal commands), plus VBScript (http://ss64.com/vb/) and Resource kit utilities.
Microsoft Powershell Help (http://technet.microsoft.com/en-us/library/ee692945.aspx)
Discussion forum (http://www.ss64.org/viewforum.php?id=14)
Links to other websites, books etc (http://ss64.com/links/pslinks.html)... (http://ss64.com/links/pslinks.html)