Skip to content

Releases: webmd-health-services/Carbon

2.11.0-rc710

19 Oct 23:32
a097227
Compare
Choose a tag to compare
2.11.0-rc710 Pre-release
Pre-release
  • Fixed: Resolve-CPathCase fails on PowerShell Core.
  • New: 'Grant-Permission', 'Get-Permission', and 'Revoke-Permission' scripts now execute correctly on
    non-Windows platforms.
  • Fixed: Install-CService now will update services when file permissions or user account privileges have changed.

2.10.2

17 Mar 18:16
9abfd4b
Compare
Choose a tag to compare

Fixed: Carbon fails to import if IIS isn't installed.

2.10.1

16 Mar 17:33
1bd4915
Compare
Choose a tag to compare

Fixed: Carbon fails to import on PowerShell 4.

2.10.0

15 Mar 20:23
5828c6c
Compare
Choose a tag to compare

TL;DR Changes

  • Fixed: Carbon's backward compatible aliases replaced with shim functions. Carbon no longer aggressively loads its
    functions.
  • New: Carbon now warns when you're using a function shim with a deprecated name. Update your code so that all Carbon
    functions have a C prefix. Carbon has a Use-CarbonPrefix.ps1 script in its bin directory that will update files to
    use the new prefix.
  • Migrated the following functions to new Carbon.Core and Carbon.Cryptography modules. These functions still exist in
    Carbon 2, so if you use all these modules together, you'll probably run into naming collisions and errors depending on
    how you install, import, and use Carbon. You'll get a warning if you use any of the functions that migrated.
    • ConvertTo-CBase64, Get-CPowerShellPath, and Invoke-CPowerShell are now in the Carbon.Core module.
    • The Test-COSIs32Bit and Test-COSIs64Bit functions merged into a Test-COperatingSystem function in the
      Carbon.Core module.
    • The Test-CPowerShellIs32Bit and Test-CPowerShellIs64Bit functions merged into a Test-CPowerShell function in
      the Carbon.Core module.
    • New: Convert-CSecureStringToString, Get-CCertificate, Install-CCertificate, Uninstall-CCertificate,
      Protect-CString, and Unprotect-CString migrated to the Carbon.Cryptography module.
  • Fixed: the Install-CCertificate function causes an extra file to be written to the Windows directory where private
    keys are saved. Depending on your environment, this could put many, many extra very small files on the file system or a
    full disk.
  • Fixed: the Install-CCertificate function could fail to install a certificate with a private key in a remote
    computer's LocalMachine store if you passed in a certificate object to install.
  • Fixed: the Install-CCertificate function always installs a certificate even if it exists in the destination store.
    Depending on your environment, this could put many, many extra very small files on the file system or a full disk. Use
    the -Force switch to always install a certificate even if it already exists in the destination store.
  • Added a -Force switch to the Install-CCertificate function to force certificates to be installed if they already
    exist in the destination store.
  • Fixed: Install-Service always writes a verbose message when installing a service.

Naming Collisions Solved (Again)

Fixed: In Carbon 2.7.0, we added a C prefix to all the Carbon functions, with aliases that used the old function
names to preserve backwards-compatability. We didn't realize at the time that aliases have the highest precedence of
commands, so Carbon's aliases hid any other commands on your system that may have been named the same. Bad idea. With
this release, Carbon no longer uses aliases for backwards-compatability. Instead, it dynamically creates shim functions
named after the old functions. These shim functions write a warning that the function with the old name is deprecated
then calls the function using its new name. Hopefully, this will finally fix the name collisions problems. The function
names with out the C prefix will be removed in Carbon 3, so update your code to make upgrading easier.

Because Carbon creates these backwards-compatible function shims dynamically, Carbon won't create a shim if a
function with the old name exists. If there is a name conflict between Carbon and another module, if you import that
module first, Carbon won't export its shim function.

Carbon on PowerShell Core

We need parts of Carbon to work on PowerShell Core. The current size of Carbon makes that hard (over 200 functions and
automated tests that take a long time). So, we're breaking Carbon into smaller modules. The new modules will all require
PowerShell 5.1+. If you use Carbon 2 and the new modules together, you'll get naming conflicts during installation and
when importing.

The first two modules are already out: Carbon.Core and Carbon.Cryptography.

Carbon.Core

Carbon.Core will contain all the functions that are foundational to all or most other future Carbon modules, or generic
functions we feel are core to Carbon and/or PowerShell. It has no dependencies. The following functions were migrated to
it:

  • ConvertTo-CBase64 (with some added functionality)
  • Get-CPowerShellPath
  • Invoke-CPowerShell
  • Test-COperatingSystem: Replaces Test-OSIs32Bit and Test-OSIs64Bit. Tests operating system type, too, so you
    can use this function instead of the $IsWindows, $IsLinux, or $IsMacOS variables. Works on versions of PowerShell
    that don't define those variables.
  • Test-CPowerShell: Replaces Test-PowerShellIs32Bit and Test-PowerShellIs64Bit. Tests edition, too. Use this
    function instead of $PSVersionTable.PSEdition. Handles when $PSVersionTable doesn't have the PSEdition property.

Carbon.Cryptography

Carbon.Crytography contains functions that are used when encrypting and decrypting strings. This is where certificate
management funtions live. These function were migrated from Carbon:

  • Convert-CSecureStringToString
  • Get-CCertificate: works on Linux and macOS when opening certificate files.
  • Install-CCertificate
  • Uninstall-CCertificate
  • Protect-CString: works on Linux and macOS.
  • Unprotect-CString: works on Linux and macOS.

2.10.1-rc660

08 Mar 20:53
67cebbe
Compare
Choose a tag to compare
2.10.1-rc660 Pre-release
Pre-release

Please read 2.10.0 release notes for upgrade notes if you're upgrading from Carbon 2.9.x or earlier.*

  • Fixed: the Install-CCertificate function causes an extra file to be written to the Windows directory where private
    keys are saved. Depending on your environment, this could put many, many extra very small files on the file system or a
    full disk.
  • Fixed: the Install-CCertificate function could fail to install a certificate with a private key in a remote
    computer's LocalMachine store if you passed in a certificate object to install.
  • Fixed: the Install-CCertificate function always installs a certificate even if it exists in the destination store.
    Depending on your environment, this could put many, many extra very small files on the file system or a full disk. Use
    the -Force switch to always install a certificate even if it already exists in the destination store.
  • Added a -Force switch to the Install-CCertificate function to force certificates to be installed if they already
    exist in the destination store.

2.10.0-rc651

03 Feb 20:36
548ae00
Compare
Choose a tag to compare
2.10.0-rc651 Pre-release
Pre-release

Naming Collisions Solved (Again)

Fixed: In Carbon 2.7.0, we added a C prefix to all the Carbon functions, with aliases that used the old function
names to preserve backwards-compatability. We didn't realize at the time that aliases have the highest precedence of
commands, so Carbon's aliases hid any other commands on your system that may have been named the same. Bad idea. With
this release, Carbon no longer uses aliases for backwards-compatability. Instead, it dynamically creates shim functions
named after the old functions. These shim functions write a warning that the function with the old name is deprecated
then calls the function using its new name. Hopefully, this will finally fix the name collisions problems. The function
names with out the C prefix will be removed in Carbon 3, so update your code to make upgrading easier.

Because Carbon creates these backwards-compatible function shims dynamically, Carbon won't create a shim if a
function with the old name exists. If there is a name conflict between Carbon and another module, if you import that
module first, Carbon won't export its shim function.

Carbon on PowerShell Core

We need parts of Carbon to work on PowerShell Core. The current size of Carbon makes that hard (over 200 functions and
automated tests that take a long time). So, we're breaking Carbon into smaller modules. The new modules will all require
PowerShell 5.1+. If you use Carbon 2 and the new modules together, you'll get naming conflicts during installation and
when importing.

The first two modules are already out: Carbon.Core and Carbon.Cryptography.

Carbon.Core

Carbon.Core will contain all the functions that are foundational to all or most other future Carbon modules, or generic
functions we feel are core to Carbon and/or PowerShell. It has no dependencies. The following functions were migrated to
it:

  • ConvertTo-CBase64 (with some added functionality)
  • Get-CPowerShellPath
  • Invoke-CPowerShell
  • Test-COperatingSystem: Replaces Test-OSIs32Bit and Test-OSIs64Bit. Tests operating system type, too, so you
    can use this function instead of the $IsWindows, $IsLinux, or $IsMacOS variables. Works on versions of PowerShell
    that don't define those variables.
  • Test-CPowerShell: Replaces Test-PowerShellIs32Bit and Test-PowerShellIs64Bit. Tests edition, too. Use this
    function instead of $PSVersionTable.PSEdition. Handles when $PSVersionTable doesn't have the PSEdition property.

Carbon.Cryptography

Carbon.Crytography contains functions that are used when encrypting and decrypting strings. This is where certificate
management funtions live. These function were migrated from Carbon:

  • Convert-CSecureStringToString
  • Get-CCertificate: works on Linux and macOS when opening certificate files.
  • Install-CCertificate
  • Uninstall-CCertificate
  • Protect-CString: works on Linux and macOS.
  • Unprotect-CString: works on Linux and macOS.

TL;DR Changes

  • Fixed: Carbon's backward compatible aliases replaced with shim functions. Carbon no longer aggressively loads its
    functions.
  • New: Carbon now warns when you're using a function shim with a deprecated name. Update your code so that all Carbon
    functions have a C prefix. Carbon has a Use-CarbonPrefix.ps1 script in its bin directory that will update files to
    use the new prefix.
  • Migrated the following functions to new Carbon.Core and Carbon.Cryptography modules. These functions still exist in
    Carbon 2, so if you use all these modules together, you'll probably run into naming collisions and errors depending on
    how you install, import, and use Carbon. You'll get a warning if you use any of the functions that migrated.
    • ConvertTo-CBase64, Get-CPowerShellPath, and Invoke-CPowerShell are now in the Carbon.Core module.
    • The Test-COSIs32Bit and Test-COSIs64Bit functions merged into a Test-COperatingSystem function in the
      Carbon.Core module.
    • The Test-CPowerShellIs32Bit and Test-CPowerShellIs64Bit functions merged into a Test-CPowerShell function in
      the Carbon.Core module.
    • New: Convert-CSecureStringToString, Get-CCertificate, Install-CCertificate, Uninstall-CCertificate,
      Protect-CString, and Unprotect-CString migrated to the Carbon.Cryptography module.

2.9.4

08 Dec 21:58
1fb0eeb
Compare
Choose a tag to compare
  • Fixed: Convert-XmlFile fails in PowerShell Core (thanks to (Joseph Block)[https://github.com/JosephBlock] for the fix).

2.9.3

18 Nov 23:42
e9c3f67
Compare
Choose a tag to compare
  • Fixed: Protect-CString and Unprotect-CString failed under PowerShell Core.
  • Fixed: Invoke-CPowerShell failed under PowerShell Core.
  • Fixed: Install-CCertificate fails under PowerShell Core.
  • Fixed: Unprotect-CString adds extra null bytes to the end of a decrypted string when using AES (-Key) encryption.

2.9.3-rc623

09 Oct 21:30
83ac950
Compare
Choose a tag to compare
2.9.3-rc623 Pre-release
Pre-release
  • Fixed: Protect-CString and Unprotect-CString failed under PowerShell Core.
  • Fixed: Invoke-CPowerShell failed under PowerShell Core.
  • Fixed: Install-CCertificate fails under PowerShell Core.

2.9.2

17 Jan 00:24
8317edb
Compare
Choose a tag to compare
  • Fixed: when encryptiong/decrypting with a thumbprint, Protect-String and Unprotect-String take more time the more certificates you have in your stores.