Powershell and Unix Tips
Things learned today:
- More on Powershell from Microsoft’s training course:
- You can use Powershell for remote servers on mobile devices using Powershell Web Application.
- The reason that you need .\ScriptName to run a script within a directory is to prevent attacks. In the old days of Unix, attackers would create scripts such as “pwd” that would execute when run within a directory.
- The Powershell community is very strong and helpful. Try asking questions on Powershell.org or on Twitter (#PowerShell).
- Implicit remoting allows you to run cmdlets on different servers all locally.
- Using icm with sessions allows you to issue commands to many computers at once remotely.
- Contract templates for freelancing.
- From Unix tutorial:
- Command substitution allows you to run a command and store the output to a variable or use it as an argument. Syntax: $(command)
- Process substitution allows a command to appear as a file. Syntax: <(command)
- Piping to grep allows you to quickly find a certain word or phrase in a file.
- Awk and sed are good for simple parsing or text manipulation problems. The author only uses sed to replace text or delete lines.