From 336f78b1433be2bcf90c2558a2ca1f3c3b1e2166 Mon Sep 17 00:00:00 2001 From: krikk Date: Tue, 14 Nov 2023 18:25:57 +0100 Subject: [PATCH 1/4] Support for the new LAPS (April 2023 Update) modified the existing LAPS Dynamic folder to work with the "new" LAPS (April 2023 Update), This Version fetches the Connections out from AD (Get-ADComputer) and the LAPS user and Password also via AD (Get-LapsADPassword) also solved the problem with german umlauts, added description field from --- .../new LAPS (Windows PowerShell).rdfx | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx diff --git a/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx b/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx new file mode 100644 index 0000000..04409ad --- /dev/null +++ b/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx @@ -0,0 +1,106 @@ + + Dynamic Folder Export + + + DynamicFolder + Clients (LAPS) + + + + + + + + +

Local Administrator Password Solution (LAPS)

 

More information on LAPS can be found here:
https://www.microsoft.com/en-us/download/details.aspx?id=46899

 

Requirements:

The dynamic credential script executes the Get-AdmPwdPassword cmdlet of the AdmPwd.PS module:
https://www.powershellgallery.com/packages/AdmPwd.PS

Make sure the module is installed/available on your system!

 

Configuration:

The dynamic folder script creates a list of available machine from the Active Directory. Configure the SearchBase path in the Custom Properties.

+ +]]>
+ + + SearchBase + Text + OU=ADM01,OU=ADM,DC=vie01,DC=local + + + Filter + Text + (OperatingSystem -like "Windows 10*" -or OperatingSystem -like "Windows 11*") -and (Enabled -eq $true) + + + powershell + + powershell + +
+
+
\ No newline at end of file From a2073c9f7b0f67d5c91af55f6f15a7dfd861d3e7 Mon Sep 17 00:00:00 2001 From: krikk Date: Tue, 14 Nov 2023 18:31:58 +0100 Subject: [PATCH 2/4] updated notes --- .../new LAPS (Windows PowerShell).rdfx | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx b/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx index 04409ad..b39ea2c 100644 --- a/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx +++ b/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx @@ -10,20 +10,19 @@ -

Local Administrator Password Solution (LAPS)

 

More information on LAPS can be found here:
https://www.microsoft.com/en-us/download/details.aspx?id=46899

 

Requirements:

The dynamic credential script executes the Get-AdmPwdPassword cmdlet of the AdmPwd.PS module:
https://www.powershellgallery.com/packages/AdmPwd.PS

Make sure the module is installed/available on your system!

 

Configuration:

The dynamic folder script creates a list of available machine from the Active Directory. Configure the SearchBase path in the Custom Properties.

+

Local Administrator Password Solution (LAPS)

 

More information on LAPS can be found here:

https://learn.microsoft.com/en-us/windows-server/identity/laps/laps-overview
 

Requirements:

The dynamic credential script executes the Get-LapsADPassword cmdlet of the new LAPS (April 2023 Update) module:
Make sure the new LAPS is installed on the System

 

Configuration:

The dynamic folder script creates a list of available machine from the Active Directory. Configure the SearchBase and Filter path in the Custom Properties.

]]> @@ -43,11 +42,8 @@ [string] $JSON = "{ `"Objects`" : [ `n" - #foreach ($comp in (Get-ADComputer -SearchBase "$CustomProperty.SearchBase$" -filter *)) -#foreach ($comp in (Get-ADComputer -SearchBase "$CustomProperty.SearchBase$" -Properties Description -filter '(OperatingSystem -like "Windows 10*" -or OperatingSystem -like "Windows 11*") -and (Enabled -eq $true)')|sort) foreach ($comp in (Get-ADComputer -SearchBase "$CustomProperty.SearchBase$" -Properties Description -filter '$CustomProperty.Filter$')|sort) - { $JSON += "{`n" $JSON += " `"Type`" : `"RemoteDesktopConnection`",`n" @@ -103,4 +99,4 @@ $JSON += "}`n" Write-Host $JSON]]> - \ No newline at end of file + From 43ad06412e1959a8fad822469b9f20a499a9d715 Mon Sep 17 00:00:00 2001 From: krikk Date: Fri, 29 Mar 2024 13:19:29 +0100 Subject: [PATCH 3/4] Rename LAPS (Windows PowerShell).rdfe to LAPS (deprecated) (Windows PowerShell).rdfe renamed file --- ...rShell).rdfe => LAPS (deprecated) (Windows PowerShell).rdfe} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Dynamic Folder/Microsoft/Windows/{LAPS (Windows PowerShell).rdfe => LAPS (deprecated) (Windows PowerShell).rdfe} (99%) diff --git a/Dynamic Folder/Microsoft/Windows/LAPS (Windows PowerShell).rdfe b/Dynamic Folder/Microsoft/Windows/LAPS (deprecated) (Windows PowerShell).rdfe similarity index 99% rename from Dynamic Folder/Microsoft/Windows/LAPS (Windows PowerShell).rdfe rename to Dynamic Folder/Microsoft/Windows/LAPS (deprecated) (Windows PowerShell).rdfe index 1ab51e6..e480ee6 100644 --- a/Dynamic Folder/Microsoft/Windows/LAPS (Windows PowerShell).rdfe +++ b/Dynamic Folder/Microsoft/Windows/LAPS (deprecated) (Windows PowerShell).rdfe @@ -1 +1 @@ -{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"Server (LAPS)","Notes":"\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t

Local Administrator Password Solution (LAPS)

 

More information on LAPS can be found here:
https://www.microsoft.com/en-us/download/details.aspx?id=46899

 

Requirements:

The dynamic credential script executes the Get-AdmPwdPassword cmdlet of the AdmPwd.PS module:
https://www.powershellgallery.com/packages/AdmPwd.PS

Make sure the module is installed/available on your system!

 

Configuration:

The dynamic folder script creates a list of available machine from the Active Directory. Configure the SearchBase path in the Custom Properties.

\r\n\r\n","CustomProperties":[{"Name":"SearchBase","Type":"Text","Value":"OU=Server,OU=contoso,DC=com"}],"ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"powershell","DynamicCredentialScript":"$ErrorActionPreference = \"Stop\"\r\n\r\nImport-Module AdmPwd.PS\r\n\r\n$Pass = Get-AdmPwdPassword -Computername $Target.Name$\r\n\r\n$JSON = \"\"\r\n$JSON += \"{`n\"\r\n$JSON += \" `\"Username`\" : `\".\\\\Administrator`\",`n\"\r\n$JSON += \" `\"Password`\" : `\"$($Pass.Password)`\"`n\"\r\n$JSON += \"}`n\"\r\n\r\nWrite-Host $JSON\r\n\r\n\r\n","Script":"$ErrorActionPreference = \"Stop\"\r\n\r\n[string] $JSON = \"{ `\"Objects`\" : [ `n\"\r\n\r\n$JSON += \"{`n\"\r\n$JSON += \" `\"Type`\" : `\"DynamicCredential`\",`n\"\r\n$JSON += \" `\"Name`\" : `\"Administrator`\",`n\"\r\n$JSON += \" `\"ID`\" : `\"LAPS`\"`n\"\r\n$JSON += \"},`n\"\r\n\r\nforeach ($comp in (Get-ADComputer -SearchBase $CustomProperty.SearchBase$ -filter *))\r\n{\r\n $JSON += \"{`n\"\r\n $JSON += \" `\"Type`\" : `\"RemoteDesktopConnection`\",`n\"\r\n $JSON += \" `\"Name`\" : `\"$($comp.Name)`\",`n\"\r\n $JSON += \" `\"ComputerName`\" : `\"$($comp.DNSHostName)`\",`n\"\r\n\t$JSON += \" `\"Path`\" : `\"Connections`\",`n\"\r\n\t$JSON += \" `\"CredentialID`\" : `\"LAPS`\"`n\"\r\n $JSON += \"},`n\"\r\n}\r\n\r\n$JSON = $JSON.Substring(0, $JSON.Length - 2)\r\n$JSON += \"`n]`n}`n\"\r\n\r\nWrite-Host $JSON"}]} \ No newline at end of file +{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"Server (LAPS)","Notes":"\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t

Local Administrator Password Solution (LAPS)

 

More information on LAPS can be found here:
https://www.microsoft.com/en-us/download/details.aspx?id=46899

 

Requirements:

The dynamic credential script executes the Get-AdmPwdPassword cmdlet of the AdmPwd.PS module:
https://www.powershellgallery.com/packages/AdmPwd.PS

Make sure the module is installed/available on your system!

 

Configuration:

The dynamic folder script creates a list of available machine from the Active Directory. Configure the SearchBase path in the Custom Properties.

\r\n\r\n","CustomProperties":[{"Name":"SearchBase","Type":"Text","Value":"OU=Server,OU=contoso,DC=com"}],"ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"powershell","DynamicCredentialScript":"$ErrorActionPreference = \"Stop\"\r\n\r\nImport-Module AdmPwd.PS\r\n\r\n$Pass = Get-AdmPwdPassword -Computername $Target.Name$\r\n\r\n$JSON = \"\"\r\n$JSON += \"{`n\"\r\n$JSON += \" `\"Username`\" : `\".\\\\Administrator`\",`n\"\r\n$JSON += \" `\"Password`\" : `\"$($Pass.Password)`\"`n\"\r\n$JSON += \"}`n\"\r\n\r\nWrite-Host $JSON\r\n\r\n\r\n","Script":"$ErrorActionPreference = \"Stop\"\r\n\r\n[string] $JSON = \"{ `\"Objects`\" : [ `n\"\r\n\r\n$JSON += \"{`n\"\r\n$JSON += \" `\"Type`\" : `\"DynamicCredential`\",`n\"\r\n$JSON += \" `\"Name`\" : `\"Administrator`\",`n\"\r\n$JSON += \" `\"ID`\" : `\"LAPS`\"`n\"\r\n$JSON += \"},`n\"\r\n\r\nforeach ($comp in (Get-ADComputer -SearchBase $CustomProperty.SearchBase$ -filter *))\r\n{\r\n $JSON += \"{`n\"\r\n $JSON += \" `\"Type`\" : `\"RemoteDesktopConnection`\",`n\"\r\n $JSON += \" `\"Name`\" : `\"$($comp.Name)`\",`n\"\r\n $JSON += \" `\"ComputerName`\" : `\"$($comp.DNSHostName)`\",`n\"\r\n\t$JSON += \" `\"Path`\" : `\"Connections`\",`n\"\r\n\t$JSON += \" `\"CredentialID`\" : `\"LAPS`\"`n\"\r\n $JSON += \"},`n\"\r\n}\r\n\r\n$JSON = $JSON.Substring(0, $JSON.Length - 2)\r\n$JSON += \"`n]`n}`n\"\r\n\r\nWrite-Host $JSON"}]} From c36a4536046a9618323c03459eb5fff815c97782 Mon Sep 17 00:00:00 2001 From: krikk Date: Fri, 29 Mar 2024 13:20:22 +0100 Subject: [PATCH 4/4] Update and rename new LAPS (Windows PowerShell).rdfx to LAPS April 2023 (Windows PowerShell).rdfx rename files to make audience clear --- ...PowerShell).rdfx => LAPS April 2023 (Windows PowerShell).rdfx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dynamic Folder/Microsoft/Windows/{new LAPS (Windows PowerShell).rdfx => LAPS April 2023 (Windows PowerShell).rdfx} (100%) diff --git a/Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx b/Dynamic Folder/Microsoft/Windows/LAPS April 2023 (Windows PowerShell).rdfx similarity index 100% rename from Dynamic Folder/Microsoft/Windows/new LAPS (Windows PowerShell).rdfx rename to Dynamic Folder/Microsoft/Windows/LAPS April 2023 (Windows PowerShell).rdfx