ITS:IntroductionToPowershell - ConnorEast/Tech-Journal GitHub Wiki
Introduction_to_powershell
Step 1: ---> Open Powershell by clicking the magnifying glass icon in the bottom right hand corner. Then type "powershell" and hit enter. This should open a box as shown in the image below.
Setting An Alis
An Alias is essentially a named convention that has been added to the system by using a conglomeration of different command inputs. For instance, you could make a command called getIP and set it equal to the grep results of the ipconfig command. To begin we will use the following command.
Set-Alias -name ifconfig -value ipconfig
The command above creates an alias with the name of ifconfig. ifconfig is then set to the function of ipconfig. ipconfig as a command shows you your devices IP configurations. That means that if you type in ifconfig into powershell it will now print out the network information related to your device. See below for an example in practice.
Deliverable 1:
Creating a Powershell Profile.
Step 1: ---> Check your profile location using "$profile"
Step 2: ---> Check if there are any items in your profile with the command "test-path $profile"
Step 3: ---> If the last step returned false create an item as follows: "New-Item -Path $profile -Type File -force"
Step 4: ---> Edit your profile using the command: "ise $profile".
Step 5: ---> add commands into your document as seen below and save using the hard-disk icon
Deliverable 2: Create a user, test password reset:
Deliverable 3: Self Made Functions:
Create a script using a "for loop" of your choosing