Read ini file issue

Hi all,

Bit of a newbie to this toolset and was wondering if i could please get some help with the following.

I have added the following in to read an ini file to determine the next actions. Works ok in my powershell script but when i copy it over to deploy-application.ps1 it does not like it one bit.

[string]$ConfigType = (Parse-IniFile -FilePath “$envSystemDrive\Build\DeviceDetails.ini”).computer.Buildtype

Could someone please advise me where I am going wrong?

Need a little more context. You’re type-casting this to a string, so $ConfigType wouldn’t be set as a variable. Your intention is a little unclear, could you post more of your script?

Why not use the toolkits get-inivalue function?

1 Like