Skip to content

Commit c2de3fc

Browse files
Merge pull request #268732 from KimForss/main
PowerShell script updates
2 parents 515f6f0 + 8da99e2 commit c2de3fc

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

articles/sap/automation/get-started.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,45 @@ The SAP automation deployment framework can also use a user assigned identity (M
141141
142142
## Pre-flight checks
143143
144-
You can use the following script to perform pre-flight checks. The script checks for the required permissions.
144+
You can use the following script to perform pre-flight checks. The script performs the following checks and tests:
145+
146+
- Checks if the service principal has the correct permissions to create resources in the subscription.
147+
- Checks if the service principal has user Access Administrator permissions.
148+
- Create a Azure Virtual Network.
149+
- Create a Azure Virtual Key Vault with private end point.
150+
- Create a Azure Files NSF share.
151+
- Create a Azure Virtual Virtual Machine with data disk using Premium Storage v2.
152+
- Check access to the required URLs using the deployed virtual machine.
145153
146154
```powershell
147155
156+
$sdaf_path = Get-Location
157+
if ( $PSVersionTable.Platform -eq "Unix") {
158+
if ( -Not (Test-Path "SDAF") ) {
159+
$sdaf_path = New-Item -Path "SDAF" -Type Directory
160+
}
161+
}
162+
else {
163+
$sdaf_path = Join-Path -Path $Env:HOMEDRIVE -ChildPath "SDAF"
164+
if ( -not (Test-Path $sdaf_path)) {
165+
New-Item -Path $sdaf_path -Type Directory
166+
}
167+
}
168+
169+
Set-Location -Path $sdaf_path
170+
148171
git clone https://github.com/Azure/sap-automation.git
149172
150173
cd sap-automation
151174
cd deploy
152175
cd scripts
153176
177+
if ( $PSVersionTable.Platform -eq "Unix") {
178+
./Test-SDAFReadiness.ps1
179+
}
180+
else {
154181
.\Test-SDAFReadiness.ps1
182+
}
155183
156184
```
157185

articles/sap/automation/plan-deployment.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,15 @@ The following example shows how to test the connectivity to the URLs by using an
256256
257257
```powershell
258258
259-
259+
$sdaf_path = Get-Location
260260
if ( $PSVersionTable.Platform -eq "Unix") {
261-
if ( Test-Path "SDAF") {
262-
}
263-
else {
264-
$sdaf_path = New-Item -Path "SDAF" -Type Directory
261+
if ( -Not (Test-Path "SDAF") ) {
262+
$sdaf_path = New-Item -Path "SDAF" -Type Directory
265263
}
266264
}
267265
else {
268266
$sdaf_path = Join-Path -Path $Env:HOMEDRIVE -ChildPath "SDAF"
269-
if ( Test-Path $sdaf_path) {
270-
}
271-
else {
267+
if ( -not (Test-Path $sdaf_path)) {
272268
New-Item -Path $sdaf_path -Type Directory
273269
}
274270
}
@@ -281,7 +277,12 @@ cd sap-automation
281277
cd deploy
282278
cd scripts
283279
284-
Test-SDAFURLs.ps1
280+
if ( $PSVersionTable.Platform -eq "Unix") {
281+
./Test-SDAFURLs.ps1
282+
}
283+
else {
284+
.\Test-SDAFURLs.ps1
285+
}
285286
286287
```
287288

0 commit comments

Comments
 (0)