#powershell Get List of Two-letter Country ISO 3166 Code (alpha-2), Currency, Language and more

#requires -version 3.0
################################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
################################################################################
#
$AllCultures = [System.Globalization.CultureInfo]::
GetCultures(
[System.Globalization.CultureTypes]::
SpecificCultures) # !AllCultures
Continue reading

#WindowsServer2016 Build 1709 (Server Core) Enable Remote Management

Except for a few control panel applets (and dialog boxes), Windows Server 2016 Build 1709 runs exclusively in Server Core text mode. This means that familiar graphical user tools are not available whether you sign-in right in front of the machine or connect from a distance over Remote Desktop.

Basic configuration such as domain/workgroup membership, computer name and network settings, etc. can be realized using the provided VB Script in the form of %windir%\system32\sconfig.cmd. Nevertheless, you can continue to use common GUI MMC legacy tools such as Event Viewer or services.msc to remotely connect to a Windows Server 2016 Build 1709 box.

Since Windows Server 2012 R2, PowerShell remoting is activated out-of-the-box, a feature which is dependent on Windows Remote Management (WinRM). This is what Server Manager relies on primarily to remotely manage Windows Server 2012 and higher versions. Server Manager remote administration of previous Windows Server versions continue to work over Distributed Component Object Model (DCOM)*.

Consequently, setting “4) Configure Remote Management” to “1) Enable Remote Management” via sconfig.cmd is only part of the story (WinRM portion). Continue reading

Zurich Kurs/Course: Windows Server 2016 Basics – Definitiv Start (ab Do. 18. Jan 2018)

Der erste, beliebte Windows Server 2016 Basics Kurs (IS36.18.11) dieses Jahres wird am Do. 18. Jan 2018 für insgesamt 6 Abende* in Zürich West, Technopark planmässig beginnen.

Sichern Sie Ihre Plätze zu diesem praxisnahen Microsoft Training für effizientes Betrieb Ihrer On-premise, Hybrid oder Cloud Datacentrelösungen heute noch!

Mehr Information und Anmeldung finden Sie hier.

*
Donnerstag 18.01.2018 18:00-21:30
Donnerstag 25.01.2018 18:00-21:30
Donnerstag 01.02.2018 18:00-21:30
Donnerstag 08.02.2018 18:00-21:30
Donnerstag 15.02.2018 Sportsferien
Donnerstag 22.02.2018 Sportsferien
Donnerstag 01.03.2018 18:00-21:30
Donnerstag 08.03.2018 18:00-21:30

#powershell Set-SmbShareAccess ?

Grant-SmbShareAccess is the go-to cmdlet to assign and modify permissions granted to trustees on a Windows NT file share as no Set-SmbShareAccess equipvalent exists.

NOTE
*-SmbShareAccess and related cmdlets are available in PowerShell 4 and higher (Module: SmbShare) and are delivered only with operating systems Windows 8 and Windows Server 2012 (and later versions).

#powershell Grant-SmbShareAccess and Security Groups

Unlike net.exe share, Grant-SmbShareAccess can accept one or more security principals for both user accounts and groups (known as “trustee”) against the -AccountName parameter.

Hence instead of:

#requires -version 4.0
#Windows 8 and Windows Server 2012 or higher
Grant-SmbShareAccess `
-Name sharename`
-AccountName `
(Get-LocalGroupMember groupname).name `
-AccessRight Read -Verbose -Confirm:$false

, simply replace the value against -AccountName with groupname.

#powershell Get-Service StartType Property

Commencing with PowerShell v5, the startup type of a conventional Windows NT service is available as the StartType property with a call to the basic Get-Service cmdlet. Ironically, this property going by the name StartupType is already configuarable pre P5 using Set-Service (local administrative permissions needed).

In prior PS versions, a similar attribute StartMode can only be retrieved using Get-WmiObject plus the -Query or -Filter/-Property parameters:

gwmi -query “Select StartMode from Win32_Service Where Name=’wuauserv'”

gwmi -class Win32_Service -Property StartMode -Filter “Name=’wuauserv'”

Alternatively,

&”$env:windir/system32/sc.exe” qc wuauserv | sls START_TYPE

gives the required value under START_TYPE.

#powershell Script: Find Active Directory User II (Update v1.10)

The Find-AdUserII function listed here is an update to this. It now accepts a text parameter which is used to search for an AD user based on a number of common properties like displayname or samaccountname. Using this as a starting point, … Continue reading

Zurich Kurs/Course: Windows Server 2016 Basics – Definitiv Start (ab Do. 24. Aug 2017)

Der praxisnahe Windows Server 2016 Basics Kurs (IS36.17.41) wird am Do. 24. Aug 2017 für insgesamt 6 Abende (18:00 bis 21:30 Uhr) in Zürich planmässig anfangen.

Sichern Sie sich Ihre Plätze und buchen Sie jetzt ansonsten müssen Sie bis Januar 2018 auf den nächsten Kurs warten. Mehr Information und Anmeldung finden Sie hier.

#powershell Script: Find Active Directory User II

#powershell Script: Find Active Directory User II (Update v1.10)

—–
Find-AdUserII is one of the many PowerShell functions/utilities in my personal script toolbox repository designed to help simplify the management and administration of just about any Active Directory Directory Services (AD DS) environments.

This self-explanatory utility works in PowerShell v2.0 and higher without any dependency on the AD PowerShell Module or other third party add-on. It accepts displayname as a parameter; you can customize the search criteria to any supported AD user attributes, for example. With the (auto) discovered forest/domain names, the function performs LDAP searches across multiple domains in your entire AD forest automagically (thanks to the .NET Framework). Enjoy!

################################################################################
# Copyright (c) 201x-2017 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Find-AdUserII.ps1
# Version 1.00
#
Continue reading

#powershell Script: Find Active Directory User I

Find-AdUserI is one of the many PowerShell functions/utilities in my personal script toolbox repository designed to help simplify the management and administration of just about any Active Directory Directory Services (AD DS) environments.

This self-explanatory utility works in PowerShell v2.0 and higher without any dependency on the AD PowerShell Module or other third party modules. It accepts SamAccountName as a parameter; you can customize the search criteria to displayname or any supported AD user attributes for example. You don’t even need to know or specify the domain name if your AD environment is a straightforward single forest single domain setup. Enjoy!

################################################################################
# Copyright (c) 201x-2017 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Find-AdUserI.ps1
# Version 1.00
#
Continue reading