YouTube magic that brings views, likes and suibscribers
Get Free YouTube Subscribers, Views and Likes

15 Useful PowerShell Commands for Beginners | Learn Microsoft PowerShell

Follow
WindowsChimp

Microsoft created the PowerShell for task automation and configuration management. If you want to learn the PowerShell and looking for some useful commands to start with, then watch this video till the end and you learn such 15 useful PowerShell commands for newbies.

Follow the timestamp to quickly jump to the command you want to learn

1. Listing the drives 0:34
GetPSDrive
To list drives with the file system
GetPSDrive –PSProvider FileSystem

2. Listing the files in a directory 1:10
GetChildItem
To list files in another directory
GetChildItem pathofanotherdirectory

3. Changing the current directory 1:36
SetLocation path

4. Creating a new item 1:53
To create directory
NewItem –ItemType Directory –Path path Name nameofthedirectory
To create file
NewItem –ItemType File –Path path –Name filename –Value “value in your file”
To edit content later
SetContent –Path pathoffile –Value “your new value”

5. Viewing file information or printing it 3:10
To view file information
GetItem filename
To view the content of the file
GetContent filename
To view it in an external window
GetContent filename | OutGridView
To print it
GetContent filename | OutPrinter

6. Renaming a file or folder 4:03
RenameItem –Path path –NewName newname

7. Copying or moving an item 4:34
To copy
CopyItem pathwithfilename –Destination destinationpath
To move
MoveItem –Path pathwithfilename –Destination destinationpath
To move and rename
MoveItem –Path pathwithfilename –Destination destinationpathwithnewname

8. Removing a file or directory 5:44
RemoveItem fileordirectoryname

9. Getting all the commands 6:00
GetCommand
To get command of specific type
GetCommand –CommandType function, alias, or cmdlet
To search for a command
GetCommand *searchvalue

10. Getting help for a command 6:32
GetHelp commandname
To get examples
GetHelp commandname Example

11. Getting the list of processes and services 7:04
For processes
GetProcess
For services
GetService

12. To stop a process 7:20
StopProcess –Name nameofprocess
To stop a particular instance of the process and confirm
StopProcess –Id idofprocess –Confirm PassThru

13. Get the list of Windows drivers 8:01
GetWindowsDriver –Online –All

14. Taking backup of drivers 8:15
ExportWindowsDriver Online Destination pathforbackup

15. Scan for malware 8:42
StartMpScan –ScanType QuickScan/FullScan –ScanPath directorypathtobescanned

We will be uploading a video on advanced PowerShell commands so subscribe to the channel and press the bell button to get the notification.

posted by medietypemx