# file or spreadsheet, or a separate JSON / XML file. # more work you could acquire this information from Active Directory, a stored CSV # based on what PDQ Inventory Collection I care about at the moment, but with a little # For instance, I query the relevant workstations out of the PDQ Inventory database # In a real scenario, you can obtain this information from whatever source you desire run a command prompt as admin on your localhost, and enter: psexec remotecomputername -u username -p password cmd psexec will connect to the remote computer and display a command prompt executing on it. # Mock a couple of computer objects using a hash you can connect to a command prompt remotely with psexec. $credentialHash = Read-Host "What is the password for $($env:username)?" -AsSecureString $credentialHash = Read-Host "What is the password for ExampleUser1?" -AsSecureString # Collect the SecureString password from the user: # Launch RDCMan.exe using our temporary RDG file # This is our RDG file for launching RDCMan, although it is not required that it be provided a. # Create a temporary file to hold the XML $fileElement.RemoveChild($groupTemplateElement) # Remove the Group template object, as it is just a blank stub at this point. # Add (via AppendChild method) a single Server object to a Group objectįunction Add-ServerToGroup($group, $serverName) # Create an RDG (XML formatted) file for RDCMan to import so that all workstations are in relevant groups. Back in March last year, Microsoft said it will deprecate its Remote Desktop Connection Manager (RDCMan) after a security vulnerability was found in the software. $ExampleGroup = Get-Group $fileElement 'ExampleUser1-group' 'exampleUser1' (Secure-Password $RDCMan ((New-Object PSCredential "user",$credentialHash).GetNetworkCredential().password)) ‘ExampleDomain’ $adminGroup = Get-Group $fileElement 'Admin-group' $env:USERNAME (Secure-Password $RDCMan ((New-Object PSCredential "user",$credentialHash).GetNetworkCredential().password)) $env:USERDOMAIN # Name your root element in the RDCMan connection window. # Root XML element that objects will append to # Be aware that you may need to update the path based on where you store the file # Store the XML template into a variable for more sensible parsing / operating $RDCMan = "E:\Remote Desktop Connection Manager\RDCMan.exe" # Store the location of the Remote Desktop Connection Manager file
0 Comments
Leave a Reply. |