Dell PowerVault DL4000 Dell PowerVault DL4000 Backup To Disk Appliance - Power - Page 149

Appendix A — Scripting, About Powershell Scripting, Powershell Scripting Prerequisites

Page 149 highlights

9 Appendix A - Scripting About Powershell Scripting Windows PowerShell is a Microsoft .NET Framework-connected environment designed for administrative automation. AppAssure 5 includes comprehensive client software development kits (SDKs) for PowerShell scripting that enables administrators to automate the administration and management of AppAssure 5 resources by the execution of commands through scripts. It lets administrative users execute user-provided PowerShell scripts at designated occurrences. For example, before or after a snapshot, attachability and mountability checks, and so on. Administrators can execute scripts from both the AppAssure 5 Core and the agent. Scripts can accept parameters and the output of a script is written to core and agent log files. NOTE: For nightly jobs, preserve one script file and the JobType input parameter to distinguish between nightly jobs. Script files are located in the %ALLUSERSPROFILE%\AppRecovery\Scripts folder: • In Windows 7, the path to locate the %ALLUSERSPROFILE% folder is: C:\ProgramData. • In Windows 2003, the path to locate the folder is: Documents and Settings\All Users\Application Data\. NOTE: Windows PowerShell is required and must be installed and configured prior to using and executing AppAssure 5 scripts. Powershell Scripting Prerequisites Before using and executing the PowerShell scripts for AppAssure 5, you must have Windows PowerShell 2.0 installed. NOTE: Make sure to place the powershell.exe.config file in the PowerShell home directory. For example, C: \WindowsPowerShell\powershell.exe. powershell.exe.config Testing Scripts If you want to test the scripts you plan to run, you can do so by using the PowerShell graphical editor, powershell_is. You also need to add the configuration file, powershell_ise.exe.config to the same folder the configuration file, powershell.exe.config. 149

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

9
Appendix A — Scripting
About Powershell Scripting
Windows PowerShell is a Microsoft .NET Framework-connected environment designed for administrative automation.
AppAssure 5 includes comprehensive client software development kits (SDKs) for PowerShell scripting that enables
administrators to automate the administration and management of AppAssure 5 resources by the execution of
commands through scripts.
It lets administrative users execute user-provided PowerShell scripts at designated occurrences. For example, before or
after a snapshot, attachability and mountability checks, and so on. Administrators can execute scripts from both the
AppAssure 5 Core and the agent. Scripts can accept parameters and the output of a script is written to core and agent
log files.
NOTE:
For nightly jobs, preserve one script file and the JobType input parameter to distinguish between nightly
jobs.
Script files are located in the
%ALLUSERSPROFILE%\AppRecovery\Scripts
folder:
In Windows 7, the path to locate the
%ALLUSERSPROFILE%
folder is:
C:\ProgramData
.
In Windows 2003, the path to locate the folder is:
Documents and Settings\All Users\Application Data\
.
NOTE:
Windows PowerShell is required and must be installed and configured prior to using and executing
AppAssure 5 scripts.
Powershell Scripting Prerequisites
Before using and executing the PowerShell scripts for AppAssure 5, you must have Windows PowerShell 2.0 installed.
NOTE:
Make sure to place the
powershell.exe.config
file in the PowerShell home directory. For example,
C:
\WindowsPowerShell\powershell.exe
.
powershell.exe.config
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
Testing Scripts
If you want to test the scripts you plan to run, you can do so by using the PowerShell graphical editor,
powershell_is
.
You also need to add the configuration file,
powershell_ise.exe.config
to the same folder the configuration file,
powershell.exe.config
.
149