List PowerShell cmdlet available parameters

Hi Guy, To dynamicly select properties of an input object regarding the PowerShell cmdlet that he will be used in. I needed a way to list cmdlet properties. Therefor I started looking in the Microsoft Get-Command cmdlet, and I found some intersting properties. [ps](Get-Command -Name $Cmdlet).Parameters.Keys[/ps] It gave me the entire list of parameters available […]

Use PowerShell to decrypt password stored in a RDG file

Hello, If, like a colleague, you forget frequently the passwords you stored in your RDG file. There is a way to decrypt the secured string using the RDCMan.exe file. First you need to copy the RDCMan.exe and change the extension to “dll” (“RDCMan.dll”). [ps]Copy-Item ‘C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe’ ‘C:\temp\RDCMan.dll’ Import-Module ‘C:\temp\RDCMan.dll’ $EncryptionSettings = […]

How to get the Krbtgt last password set value using powershell

Hello, For a script purpose I needed to have the date of the last password set of the Krbtgt account. To do so I wrote this PowerShell function: [ps] Function Get-ADKrbtgtPwdLastSet{ [CmdletBinding()] Param( [Parameter(Mandatory=$false, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, HelpMessage=’Name of the domain.’, Position=0)] [ValidateScript({Test-Connection -ComputerName $_ -Count 2 -Quiet})] [String]$DomainName = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name ) Begin{ } Process{ $RodcKrbtgtSearcher […]

Store PowerShell Credentials in a XML File

Hello, Here is the fastest and easiest way to store, “as secure as possible”, Credentials in a XML File. Get-Credential | Export-Clixml -Path “$Path\Credentials.xml” Alternativly, you can also use Read-Host to prompt for input. $UserName = Read-Host ‘Enter Username’ $Password = Read-Host ‘Enter Password’ -AsSecureString New-Object System.Management.Automation.PSCredential ($UserName, $Password) | Export-Clixml -Path “$Path\Credentials.xml” The stored […]

Run a FIM 2010 R2 specific Management Agent with PowerShell

Hello, Here is a cmdlet I to start a selected Management Agent with a specific Run Profil. (Get-WmiObject -ComputerName $FIMSyncServer -NameSpace ‘root/MicrosoftIdentityIntegrationServer’ -Class ‘MIIS_ManagementAgent’ | Where-Object { $_.Name -eq $ManagementAgent }).Execute($RunProfile)

List FIM 2010 R2 Management Agents with PowerShell

Hello, Here is the cmdlet to list FIM Sync Management Agents. Get-WmiObject -ComputerName ‘FIMSyncServer’ -NameSpace ‘root/MicrosoftIdentityIntegrationServer’ -Class ‘MIIS_ManagementAgent’