7.1 Powershell Basics Flashcards
Powershell
A command line shell and scripting language designed specifically for system administration.
Commands, called CMDLETS, let you manage computers from the command line.
cmdlets
‘Command let’ is a lightweight command used in the windows powershell environment. Powershell invokes these cmdlets at command prompt. You can create and invoke them programatically through API’s (Application Program Interface).
- cmdlets are .NET framework class objects.
- cmdlets can be constructed from as few as a dozen lines of code
- cmdlets process works on objects not on text stream and objects can be passed as output for pipelining
- cmdlets are record based as they process a single object at a time
Create Folder
New-Item -Path \Test Folder
Create File
New-Item -Path \Test File
Copy Folder
Copy-Item -Path1\TestFolder -Path2\TestFolder
Copy File
Copy-Item -Path1\TestFile -Path2\TestFile
Delete Folder
Remove-Item -Path \TestFolder
Delete File
Remove-Item -Path \TestFile
Move Folder
Move-Item -Path1 -Path2
Move File
Move-Item -Path1 -Path2