-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to run a DSC config from Github pipeline #5626
Comments
It seems like that in your How does the directory structure look like in your case and both files? Is it possible for you to execute it locally? |
Thank you for the answer! So now it reaches the Mof file generation command, but it goes on indefinitely. Any idea what could cause this? What else can I share to help you see the problem better? |
A sample M365TenantConfig.ps1 would look like this for my case: # Generated with Microsoft365DSC version 1.24.1218.1
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
)
Configuration M365TenantConfig
{
param (
)
$OrganizationName = $ConfigurationData.NonNodeData.OrganizationName
Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.24.1218.1'
Node localhost
{.
....
}
}
M365TenantConfig -ConfigurationData .\ConfigurationData.psd1 In the same directory, I have a ConfigurationData.psd1 file with the following content: @{
AllNodes = @(
@{
NodeName = "localhost"
PSDscAllowPlainTextPassword = $true;
PSDscAllowDomainUser = $true;
#region Parameters
# Default Value Used to Ensure a Configuration Data File is Generated
ServerNumber = "0"
}
)
NonNodeData = @(
@{
# Tenant's default verified domain name
OrganizationName = "<your organization>.onmicrosoft.com"
# Azure AD Application Id for Authentication
ApplicationId = "<application id, or credential, whatever you like>"
# The Id or Name of the tenant to authenticate against
TenantId = "<same as your organization>.onmicrosoft.com"
# Thumbprint of the certificate to use for authentication
CertificateThumbprint = "<certificate thumbprint>"
}
)
} To execute it, simply run |
Thank you for the answer again! The problem was that i had multiple parameters and it somhow interfered with the mof file generation. |
Hello everyone!
I have a problem with deploying a configuration with github actions.
The code that throws the error:
name: Generate MOF File and Apply Configuration
$ConfigPath = "$ (Get-Location)/First/M365TenantConfig.ps1"
$ConfigDataPath = "$ (Get-Location)/First/ConfigurationData.psd1"
$MofOutputPath = "$ (Get-Location)/First/M365TenantConfig"
shell: pwsh
run: |
# Correct paths for configuration and data files
The error:
Generating MOF file and applying configuration...
M365TenantConfig.ps1: D:\a_temp\7545ee67-891b-40ea-871e-d193462856fe.ps1:8
Line |
8 | . $ConfigPath
| ~~~~~~~~~~~~~
| Cannot process argument transformation on parameter 'ConfigurationData'. Cannot find path
| 'D:\a\PRJ_Microsoft365_DSC_Repository\PRJ_Microsoft365_DSC_Repository\ConfigurationData.psd1' because it does
| not exist.
Error: Process completed with exit code 1.
Does anyone know what causes the issue and how can be resolved.
Thank you in advance!
The text was updated successfully, but these errors were encountered: