PS1
PS1
1 Introduction .................................................................................................... 4
2 PowerShell ..................................................................................................... 5
2.1 Basics .................................................................................................. 5
2.2 PowerShell versions ............................................................................ 6
2.3 Commands .......................................................................................... 8
2.4 Parameters .......................................................................................... 9
2.5 Object pipeline ................................................................................... 10
2.6 Variables ............................................................................................ 11
2.7 Scripts and functions ......................................................................... 13
2.8 Modules ............................................................................................. 15
3 Task automation features in PowerShell...................................................... 16
3.1 Introduction to task automation .......................................................... 16
3.2 Task ................................................................................................... 17
3.3 Logging .............................................................................................. 17
3.4 Remoting ........................................................................................... 23
3.5 Background jobs ................................................................................ 26
3.6 Scheduled jobs .................................................................................. 30
3.6.1 Triggers ............................................................................................. 31
3.6.2 Managing scheduled jobs .................................................................. 32
3.6.3 Utilizing scheduled automation .......................................................... 34
3.7 Workflows .......................................................................................... 35
3.7.1 Defining workflows ............................................................................. 36
3.7.2 Limitations in workflows ..................................................................... 37
3.7.3 Executing workflows .......................................................................... 39
3.7.4 Workflows as jobs .............................................................................. 40
3.7.5 Utilizing workflows ............................................................................. 42
4 In practice .................................................................................................... 43
4.1 Archiving files..................................................................................... 43
4.2 Collecting information about computers ............................................. 45
4.3 Adding computers to a domain .......................................................... 48
5 Conclusion ................................................................................................... 50
References........................................................................................................ 54