d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Powershell
Add Reply New Topic New Poll
Member
Posts: 12,348
Joined: Jun 30 2007
Gold: 1,573.00
Trader: Trusted
Apr 13 2014 11:32am
Looking for someone who could write the script and explain what each part is doing so i can try an understand how powershell works i have a few more assignments ill prob need help with too

Powershell script control

Use get-member to see all the properties you can examine in the get-process and get-psdrive cmdlets.

Create a command to show the free space for each drive on your system. Show just the two columns for drive name and free space, and sort it by the free space.

Create a command to display the paged, private and virtual memory size of your powershell process.

Create a command that shows the 5 processes using the most cpu and shows their name and how much cpu they are using.

Use the out-gridview cmdlet to show the current processes and try sorting on the different columns.

Use the get-process cmdlet to produce various outputs and save them in different formats.

Use the > redirect to save the output of get-process to a txt file named get-process.txt.
Use export-csv to save the output of get-process to a file named get-process.csv.
Use export-clixml to save the output of get-process to a file named get-process.xml.
Compare the sizes of the 3 output files. Which one is largest and why? Which one is smallest and why? What default applications can be used to view the 3 different formats of output?

Use the get-alias cmdlet to view the predefined aliases on the system.

Use the ls or dir command to view the environment variables available to you.

Use the ls or dir command to view the functions defined for you. Use get-content to view the commands in the help function.


Member
Posts: 8,112
Joined: Sep 23 2006
Gold: 3,558.23
Apr 14 2014 09:15pm
Quote (Derek @ Apr 13 2014 12:32pm)
Looking for someone who could write the script and explain what each part is doing so i can try an understand how powershell works i have a few more assignments ill prob need help with too

Man, first AD and now powershell. Sounds like some pretty awesome classes!! Not really a job for a real script here, more just running through some of the commands to see what they can do. Lots of pipe use here.

Here's a few places to start.

Use get-member to see all the properties you can examine in the get-process and get-psdrive cmdlets.
Run this:
Get-Process | Get-Member

Create a command to show the free space for each drive on your system. Show just the two columns for drive name and free space, and sort it by the free space.
Get-Volume | select DriveLetter,SizeRemaining | Sort-Object SizeRemaining

Create a command that shows the 5 processes using the most cpu and shows their name and how much cpu they are using.
Get-Process | select CPU,ProcessName | Sort-Object CPU | select -last 5

Use the out-gridview cmdlet to show the current processes and try sorting on the different columns.
get-process | Out-GridView | Sort-Object Name

Use the get-alias cmdlet to view the predefined aliases on the system.
get-alias
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 14 2014 10:07pm
Quote (Qord @ Apr 14 2014 11:15pm)
Man, first AD and now powershell. Sounds like some pretty awesome classes!! Not really a job for a real script here, more just running through some of the commands to see what they can do. Lots of pipe use here.

Here's a few places to start.

Use get-member to see all the properties you can examine in the get-process and get-psdrive cmdlets.Run this:
Get-Process | Get-Member

Create a command to show the free space for each drive on your system. Show just the two columns for drive name and free space, and sort it by the free space.Get-Volume | select DriveLetter,SizeRemaining | Sort-Object SizeRemaining

Create a command that shows the 5 processes using the most cpu and shows their name and how much cpu they are using.Get-Process | select CPU,ProcessName | Sort-Object CPU | select -last 5

Use the out-gridview cmdlet to show the current processes and try sorting on the different columns.get-process | Out-GridView | Sort-Object Name

Use the get-alias cmdlet to view the predefined aliases on the system.get-alias


class sounds a heck of a lot more useful than my crappy school. i'm actually kinda envious
Go Back To Homework Help Topic List
Add Reply New Topic New Poll