> pshdo

Carbon 2.3.0 Released

Carbon 2.3.0 is out. You can download Carbon as a .ZIP archive, NuGet package, Chocolatey package, or from the PowerShell Gallery. It may take a week or two for the package to show up at chocolatey.org.

Enhancements

  • Protect-String can now encrypt with a key, password, or passphrase (i.e. it can now encrypt with symmetric encryption).
  • Unprotect-String can now decrypt with a key, password, or passphrase (i.e. it can now decrypt using symmetric encryption).
  • Set-HostsEntry now supports IPv6 addresses (fixes issue).
  • Grant-Permission now supports creating Deny access rules. Use the new Type parameter. Fixes issue #152.
  • Set-EnvironmentVariable:
    • Added -Force switch to make all variable modifications immediately visible in the current PowerShell process’s env: drive. Restarts are no longer required.
    • You can now set an environment variable for other users. Use the Credential parameter to specify the user’s credentials. Fixes issue #151.
  • Remove-EnvironmentVariable:
    • Added -Force switch to make all variable removals immediately visible in the current PowerShell process’s env: drive. Restarts are no longer required.
    • You can now remove variables from multiple targets/scopes at once.
    • You can now remove an environment variable for other users. Use the Credential parameter to specify the user’s credentials.
  • Invoke-PowerShell:
    • It now runs PowerShell commands. Pass a string of PowerShell code with the Command parameter.
    • It now runs encoded PowerShell commands. Pass the string of PowerShell code with the Command parameter and use the -Encode switch.
    • It now runs scripts and commands as another user. Use the Credential parameter to pass the user’s credentials along with the FilePath and Command parameters to run scripts and commands, respectively.

Bug Fixes

  • Fixed: Set-RegistryKeyValue fails when -String parameter’s value is $null or empty (fixes issue #211).
  • Fixed: Can’t import Carbon in a 32-bit PowerShell 4 session on a 64-bit operating system (fixes issue #199).
  • Fixed: Documentation for the Install-ScheduledTask function’s HighestAvailableRunLevel is lying (fixes issue #205).
  • Fixed: Carbon_FirewallRule fails when Profile property set to multiple values (fixes issue #209).
  • Fixed: Install-IisAppPool can’t set .NET framework version to No Managed Code (fixes issue #210).
  • Fixed: Get-SslCertificateBinding fails if the operating system’s culture is not en-US (fixes issue #171).
  • Fixed: Install-ScheduledTask fails when creating a task that runs during a specific week of the month on Sundays. (You’re going to love this: the underlying int value for [DayOfWeek]::Sunday is 0, so when testing if a DayOfWeek typed variable set to Sunday has a value, it returns $false. This made Install-ScheduledTask add the /D parameter without a value.

Carbon 2.2.0 Released

Carbon 2.2.0 is out. You can download Carbon as a .ZIP archive, NuGet package, Chocolatey package, or from the PowerShell Gallery. It may take a week or two for the package to show up at chocolatey.org.

Enhancements

  • Aded a LiteralPath parameter to Test-PathIsJunction for testing paths that contain wildcard characters (e.g. [, ], etc.).
  • Remove-Junction now supports removing multiple junctions with wildcards.
  • Added a LiteralPath parameter to Remove-Junction for deleting junctions whose paths contain wildcard characters (e.g. [, ], etc.).
  • Added a LiteralPath parameter to Uninstall-Junction for deleting junctions whose paths contain wildcard characters (e.g. [, ], etc.).
  • Created Remove-DotNetAppSetting function for removing app settings from .NET framework machine.config files.
  • Created Read-File function for reading text files and retrying if the read fails. Good for reading files that get intermittently locked, like the Windows hosts file.
  • Created Write-File function for writing text files and retrying if the write fails. Good for writing files that get intermittently locked, like the Windows hosts file.
  • Made the following functions obsolete:
    • Get-WindowsFeature
    • Install-Msmq
    • Install-WindowsFeature
    • Resolve-WindowsFeatureName
    • Uninstall-WindowsFeature

Bug Fixes

  • Fixed: Add-GroupMember, over PowerShell remoting, fails to add a member to groups that have non-local users/groups (fixes issue #187: Add-GroupMember fails when using PowerShell Remoting)
  • Fixed: Remove-GroupMember, over PowerShell remoting, fails to remove a member from groups that have non-local users/groups.
  • Fixed: Test-PathIsJunction returns multiple results if the Path parameter contains wildcards and matches multiple items.
  • Fixed: Install-Junction can’t install a junction whose path contains wildcard characters (fixes issue #190).
  • Fixed: New-Junction writes wrong error when creating an existing junction whose path contains wildcard characters.
  • Fixed: Install-Service doesn’t update/change an existing service’s account when using the Credential parameter (fixes issue #185).
  • Fixed: Uninstall-FileShare fails if a share’s physical path doesn’t exist.
  • Fixed (hopefully): Get-FileSharePermission writes an error if a share’s security information is corrupted (fixes issue #188). I was unable to reproduce the error, and the error was reported anonyously, so I did my best.
  • Fixed: Get-PowerShellModuleInstallPath returns multiple paths if the standard PowerShell module path is listed twice in the PSModulePath environment variable.
  • Fixed: Chocolatey package fails if the standard PowerShell module path is listed twice in thePSModulePath environment (fixes issue #192).
  • Fixed: Get-PowerShellModuleInstallPath doesn’t return the module install path if it doesn’t exist. Sometimes it doesn’t yet.
  • Fixed: Carbon_ScheduledTask and Carbon_IniFile DSC resources' Get-TargetResource functions don’t return correct resource properties and causes Get-DscConfiguration to fail (fixes issue #193).
  • Fixed: Carbon_FirewallRule DSC resource always re-installs a firewall rule if Profile property contains multiple values (i.e. it doesn’t properly parse netsh output).
  • Fixed: about_Carbon_Installation help topic had a typo.
  • Fixed: Set-HostsEntry fails to stop when the hosts file is in use and can’t be read.

Carbon 2.1.1 Released

Carbon 2.1.1 is out. You can download Carbon as a .ZIP archive, NuGet package, Chocolatey package, or from the PowerShell Gallery. It may take a week or two for the package to show up at chocolatey.org.

Bug Fixes

  • Fixed: unable to publish module to PowerShell Gallery because RequiredAssemblies module manifest data used an absolute path generated with Join-Path and $PSScriptRoot, which aren’t allowed in module manifests.
  • Fixed: missing PowerShell Gallery tags, license URI, project URI, and release notes metadata.
  • Fixed: copyright date in module manifest is 2015.
  • Fixed: PowerShell gallery missing function list.
  • Fixed: Restricted user accounts can’t import Carbon (issue #180).
  • Fixed: Carbon_Privilege DSC resource fails to remove all a user’s privileges (issue #178).
  • Fixed: Remove-IniEntry fails to remove last INI entry in a file (issue #179).

Carbon 2.1.0 Released

Carbon 2.1.0 is out. You can download Carbon as a .ZIP archive, NuGet package, Chocolatey package, or from the PowerShell Gallery. It may take a week or two for the package to show up at chocolatey.org.

New Functions

  • Get-HttpUrlAcl: uses Windows API to return HTTP URL ACLs; replaces the netsh http show urlacl command.
  • Grant-HttpUrlPermission: uses Windows API to grant listen/delegate permissions on HTTP URLs; replaces the netsh http add urlacl command.
  • Revoke-HttpUrlPermission: uses Windows API to revoke all a user or group’s permissions on HTTP URLs; replaces the netsh http delete urlacl command.
  • Install-Directory: creates a directory (and any missing parents), if it doesn’t exist already. Finally!
  • Uninstall-Directory: removes a directory, if it exists. Finally!
  • Uninstall-Group: uses the DirectoryServices.AccountManagement .NET API to remove a group, if it exists.
  • Test-GroupMember: uses the DirectoryServices.AccountManagemetn .NET API to test if a principal is a member of a group.

New DSC Resource

  • Carbon_Group: resource for configuring local groups.

Bug Fixes

  • Fixed: Install-FileShare always re-configures existing shares; it doesn’t properly detect permissions that need to be removed.
  • Fixed: Set-IniEntry fails to preserve unicode characters with diacritics in INI entry names and values.
  • Fixed: Remove-IniEntry fails to preserve unicode characters with diacritics in INI entry names and values.
  • Fixed: Set-HostsEntry leaves trailing tabs and whitespace after all but the last line.
  • Fixed: Get-PowerShellModuleInstallPath returns wrong path for PowerShell 4.
  • Fixed: Protect-String fails when Carbon is installed in a module path that contains spaces (fixes issue #174).
  • Fixed: New-RsaKeyPair generates a key pair that isn’t supported for encrypting/decrypting DSC credentials or supported by the CMS message cmdlets.
  • Fixed: Get-ScheduledTask returns invalid task commands when those commands contain quotes (works around an issue where schtasks.exe CSV output can’t be parsed correctly by ConvertFrom-Csv).
  • Fixed: Add-GroupMember and Remove-GroupMember fail when adding Everyone or NT Service\* accounts to a group (fixes issue #177).
  • Fixed: Get-SheduledTask writes an error if a scheduled task’s XML definition is for an executable and doesn’t contain an arguments element.

Other Improvements

  • Obsolete function parameters will no longer show in Intellisense (added the DontShow parameter property).
  • Test-AdminPrivilege: changed its verbose message to a debug message.
  • Set-HostsEntry:
    • only updates hosts file if it needs to change
    • added an improved verbose message when setting a hosts entry
    • improved error handling when hosts file can’t be opened for reading
  • Install-Certificate can now install a certificate on a remote computer.
  • Initialize-Lcm now uses Install-Certificate to install the decryption certificate on the remote computer.
  • Uninstall-Certificate can now uninstall a certificate on a remote computer.
  • The following functions now write warning if you pass them a plain-text password. You should pass a SecureString instead.
    • Install-Certificate
    • Initialize-Lcm
  • New-RsaKeyPair:
    • Refactored to use certreq.exe instead of makecert.exe and pvk2pfx.exe.
    • Can now run non-interactively: added a -Password parameter used to protect the private key (it used to prompt you).
    • Fixed: generates a key pair that isn’t supported for encrypting/decrypting DSC credentials or supported by the CMS message cmdlets.
    • Made the -ValidFrom and -Authority parameters obsolete.
  • Added some verbose messages to Install-Group and Add-MemberToGroup when they create/modify their objects.
  • Install-Group only saves changes to a group if changes were made.