In: Computer Science
DONE IN POWERSHELL
create a function that allows the user to perform the
following tasks
a.
Create a folder named NetworkInformation
Create a file in the above folder named
NetworkInformation.txt. Pipe the Get-NetTCPConnection, Get-NetNeighbor, and Get-NetUDPEndPoint cmdlets output into the file
script.ps1
************
New-Item -Path 'NetworkInformation' -ItemType Directory
New-Item -Path 'C:\Users\Administrator\Desktop\\NetworkInformation\NetworkInformation.txt' -ItemType File
Get-NetTCPConnection | Out-File C:\Users\Administrator\Desktop\\NetworkInformation\NetworkInformation.txt
Get-NetNeighbor | Add-Content C:\Users\Administrator\Desktop\\NetworkInformation\NetworkInformation.txt
NetUDPEndPoint | Add-Content C:\Users\Administrator\Desktop\\NetworkInformation\NetworkInformation.txt
if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)