forked from d365collaborative/d365fo.tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request d365collaborative#809 from FH-Inway/improve-entra-…
…integration Improve entra integration
- Loading branch information
Showing
14 changed files
with
423 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
|
||
<# | ||
.SYNOPSIS | ||
Backup the wif.config file | ||
.DESCRIPTION | ||
Will backup the wif.config file located in the AOS / IIS folder | ||
.PARAMETER OutputPath | ||
Path to the folder where you want the web.config file to be persisted | ||
Default is: "C:\Temp\d365fo.tools\WifConfigBackup" | ||
.PARAMETER Force | ||
Instructs the cmdlet to overwrite the destination file if it already exists | ||
.EXAMPLE | ||
PS C:\> Backup-D365WifConfig | ||
Will locate the wif.config file, and back it up. | ||
It will look for the file in the AOS / IIS folder. E.g. K:\AosService\WebRoot\wif.config. | ||
It will save the file to the default location: "C:\Temp\d365fo.tools\WifConfigBackup". | ||
A result set example: | ||
Filename LastModified File | ||
-------- ------------ ---- | ||
wif.config 6/29/2021 7:31:04 PM C:\temp\d365fo.tools\WifConfigBackup\wif.config | ||
.EXAMPLE | ||
PS C:\> Backup-D365WifConfig -Force | ||
Will locate the wif.config file, back it up, and overwrite if a previous backup file exists. | ||
It will look for the file in the AOS / IIS folder. E.g. K:\AosService\WebRoot\wif.config. | ||
It will save the file to the default location: "C:\Temp\d365fo.tools\WifConfigBackup". | ||
It will overwrite any file named wif.config in the destination folder. | ||
A result set example: | ||
Filename LastModified File | ||
-------- ------------ ---- | ||
wif.config 6/29/2021 7:31:04 PM C:\temp\d365fo.tools\WifConfigBackup\wif.config | ||
.NOTES | ||
Author: Florian Hopfner (@FH-Inway) | ||
#> | ||
function Backup-D365WifConfig { | ||
[CmdletBinding()] | ||
[OutputType()] | ||
param ( | ||
[string] $OutputPath = $(Join-Path $Script:DefaultTempPath "WifConfigBackup"), | ||
|
||
[switch] $Force | ||
) | ||
|
||
begin { | ||
if (-not (Test-PathExists -Path $OutputPath -Type Container -Create)) { return } | ||
|
||
$File = $(Join-Path -Path $Script:AOSPath -ChildPath $Script:WifConfig) | ||
} | ||
|
||
process { | ||
|
||
if (-not (Test-PathExists -Path $File -Type Leaf)) { return } | ||
|
||
if (Test-PSFFunctionInterrupt) { return } | ||
|
||
Backup-File -File $File -DestinationPath $OutputPath -Force:$Force | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.