Skip to content

Instantly share code, notes, and snippets.

@FH-Inway
FH-Inway / d365fo.tools-az.storage-test.log
Created June 26, 2022 13:46
Log of d365fo.tools Az.Storage test
PS C:\windows\system32> $repositoryModulePath = ".\d365fo.tools"
$azureStorageAccountId = "miscfiles"
$sas = "sv2018-03-28&siunlisted&src&sigAUOpdsfpoWE976ASDhfjkasdf(5678sdfhk"
$container = "backupfiles"
$fileName = "Test.txt"
# Install d365fo.tools prerequisites
$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel")
foreach ($item in $modules) {
@FH-Inway
FH-Inway / gist:a1eba50d65331a484ff892dc25683291
Created June 19, 2022 11:37
Rename-D365ComputerName with invalid -NewName issue
PS C:\> Rename-D365ComputerName -NewName d365fo.tools -ShowOriginalProgress -Verbose
VERBOSE: [03:46:00][Rename-D365ComputerName] Testing for elevated runtime
VERBOSE: [03:46:00][Rename-D365ComputerName] Renaming computer to d365fo.tools
Rename-Computer : Skip computer 'MININT-57EHFHJ' with new name 'd365fo.tools' because the new name is not valid. The
new computer name entered is not properly formatted. Standard names may contain letters (a-z, A-Z), numbers (0-9), and
hyphens (-), but no spaces or periods (.). The name may not consist entirely of digits, and may not be longer than 63
characters.
At line:109 char:5
+ Rename-Computer -NewName $NewName -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@FH-Inway
FH-Inway / 10.0.46.VHD.txt
Last active January 17, 2026 12:28
List D365FO T1 components
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.3.1 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script 3.0.0 Az.Advisor {Disable-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration, Get-AzAdvisorRecommendatio...
Script 7.0.0 Az.Aks {Disable-AzAksAddOn, Enable-AzAksAddOn, Get-AzAksCluster, Get-AzAksNodePool...}
Script 1.2.0 Az.AnalysisServices
@FH-Inway
FH-Inway / AutoDeployPatch.patch
Created March 13, 2022 11:00
Patch for AutoDeployReportAndSyncDB.ps1
--- AutoDeployReportAndSyncDB.ps1 Sun Mar 28 05:19:50 2021
+++ AutoDeployReportAndSyncDB_patched.ps1 Sun Apr 18 16:14:01 2021
@@ -22,6 +22,7 @@
[hashtable]$Credentials
)
#db sync
+invoke-Expression "net start reportserver"
$dbSyncScriptPath = "$PSScriptRoot\AutoDBSync.ps1"
$dbSyncScriptPath = Resolve-Path -Path $dbSyncScriptPath
[ExtensionOf(classStr(FormRun))]
public final class FormRun_Class_Extension
{
/// <summary>
/// This allows unencrypted setting of the recordContext via the q querystring parameter:
/// q={"Parameters":[{"DataSource":"CustTable","FieldValues":[{"Field":"AccountNum","Value":"C123456789"}]}]}
/// </summary>
/// <param name = "_recordContext"></param>
/// <returns></returns>
public boolean applyRecordContext(str _recordContext)
@FH-Inway
FH-Inway / gist:939489e0b350d89cd770df8ee4431f81
Created October 16, 2021 11:08
d365fo.tools Enable-MaintenanceMode error
**********************
Windows PowerShell transcript start
Start time: 20211016130105
Username: AAA-1V-FH01\Administrator
RunAs User: AAA-1V-FH01\Administrator
Machine: AAA-1V-FH01 (Microsoft Windows NT 10.0.14393.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 7336
PSVersion: 5.1.14393.4530
PSEdition: Desktop