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 thenetsh http show urlaclcommand.Grant-HttpUrlPermission: uses Windows API to grant listen/delegate permissions on HTTP URLs; replaces thenetsh http add urlaclcommand.Revoke-HttpUrlPermission: uses Windows API to revoke all a user or group’s permissions on HTTP URLs; replaces thenetsh http delete urlaclcommand.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 theDirectoryServices.AccountManagement.NET API to remove a group, if it exists.Test-GroupMember: uses theDirectoryServices.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-FileSharealways re-configures existing shares; it doesn’t properly detect permissions that need to be removed. - Fixed:
Set-IniEntryfails to preserve unicode characters with diacritics in INI entry names and values. - Fixed:
Remove-IniEntryfails to preserve unicode characters with diacritics in INI entry names and values. - Fixed:
Set-HostsEntryleaves trailing tabs and whitespace after all but the last line. - Fixed:
Get-PowerShellModuleInstallPathreturns wrong path for PowerShell 4. - Fixed:
Protect-Stringfails when Carbon is installed in a module path that contains spaces (fixes issue #174). - Fixed:
New-RsaKeyPairgenerates a key pair that isn’t supported for encrypting/decrypting DSC credentials or supported by the CMS message cmdlets. - Fixed:
Get-ScheduledTaskreturns invalid task commands when those commands contain quotes (works around an issue whereschtasks.exeCSV output can’t be parsed correctly byConvertFrom-Csv). - Fixed:
Add-GroupMemberandRemove-GroupMemberfail when addingEveryoneorNT Service\*accounts to a group (fixes issue #177). - Fixed:
Get-SheduledTaskwrites 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
DontShowparameter 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-Certificatecan now install a certificate on a remote computer.Initialize-Lcmnow usesInstall-Certificateto install the decryption certificate on the remote computer.Uninstall-Certificatecan 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
SecureStringinstead.Install-CertificateInitialize-Lcm
New-RsaKeyPair:- Refactored to use
certreq.exeinstead ofmakecert.exeandpvk2pfx.exe. - Can now run non-interactively: added a
-Passwordparameter 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
-ValidFromand-Authorityparameters obsolete.
- Refactored to use
- Added some verbose messages to
Install-GroupandAdd-MemberToGroupwhen they create/modify their objects. Install-Grouponly saves changes to a group if changes were made.