I am new on Powershell and I have been give this task and I am struggling with it please help.
Create a script that obtains the machine name. The script should then write out the machine name
backwards and store it in task3.txt in the user’s temporary directory (C:\Temp or tmp). You must use a loop
to achieve this.
I am struggling with creating a loop that will display the computer name backwards and it is not a homework from school but I am learning how to script now
The second link I posted in my answer actually has the answer.
Consider the name of the computer as an array of characters. If you know the length of the array you can set up a loop decreasing the index of the characters iterating over all single characters starting with the last (highest index).