You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is it possible to preserve empty properties and write them back into the file, because I want to preserve as much information about an object as possible.
I get the following object from M365Dsc Export:
AADGroup "AADGroup-sg-Legal"
{
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
Description = "All legal executives";
DisplayName = "sg-Legal";
Ensure = "Present";
GroupTypes = @();
Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
MailEnabled = $False;
MailNickname = "sgLegal";
MemberOf = @();
Members = @("[email protected]","[email protected]","[email protected]");
Owners = @();
SecurityEnabled = $True;
TenantId = $OrganizationName;
}
When I use the following code:
$converted=ConvertTo-DSCObject -Path .\M365TenantConfig.ps1
$convertedback = ConvertFrom-DSCObject $converted
after the conversion the object looks like this:
AADGroup "AADGroup-sg-Legal"
{
Description = "All legal executives"
MailEnabled = $False
Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ApplicationId = "$ConfigurationData.NonNodeData.ApplicationId"
Ensure = "Present"
MailNickname = "sgLegal"
SecurityEnabled = $True
TenantId = "$OrganizationName"
CertificateThumbprint = "$ConfigurationData.NonNodeData.CertificateThumbprint"
DisplayName = "sg-Legal"
Members = @("[email protected]","[email protected]","[email protected]")
}
Is it possible to add a flag with convertFrom-DSCObject like preserveEmptyProperties so that I also get the empty properties back again after conversion?
The text was updated successfully, but these errors were encountered:
Thanks for the additional information. Currently, there is work for a V2 version of DSCParser and we need to make sure that this feature is going to be implemented. It's important to have empty definitions in the parsed objects.
is it possible to preserve empty properties and write them back into the file, because I want to preserve as much information about an object as possible.
I get the following object from M365Dsc Export:
AADGroup "AADGroup-sg-Legal"
{
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
Description = "All legal executives";
DisplayName = "sg-Legal";
Ensure = "Present";
GroupTypes = @();
Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
MailEnabled = $False;
MailNickname = "sgLegal";
MemberOf = @();
Members = @("[email protected]","[email protected]","[email protected]");
Owners = @();
SecurityEnabled = $True;
TenantId = $OrganizationName;
}
When I use the following code:
$converted=ConvertTo-DSCObject -Path .\M365TenantConfig.ps1
$convertedback = ConvertFrom-DSCObject $converted
after the conversion the object looks like this:
AADGroup "AADGroup-sg-Legal"
{
Description = "All legal executives"
MailEnabled = $False
Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ApplicationId = "$ConfigurationData.NonNodeData.ApplicationId"
Ensure = "Present"
MailNickname = "sgLegal"
SecurityEnabled = $True
TenantId = "$OrganizationName"
CertificateThumbprint = "$ConfigurationData.NonNodeData.CertificateThumbprint"
DisplayName = "sg-Legal"
Members = @("[email protected]","[email protected]","[email protected]")
}
Is it possible to add a flag with convertFrom-DSCObject like preserveEmptyProperties so that I also get the empty properties back again after conversion?
The text was updated successfully, but these errors were encountered: