• About

Information Dynamics

Information Dynamics

Monthly Archives: March 2019

Useful PS Active Directory commands

14 Thursday Mar 2019

Posted by GIRISH SRINIVASA in ADCS, PowerShell

≈ Leave a comment

1.Retrieve a user from AD based on Logon Name

Get-ADUser -Identity [LogonName]

2.To retrieve all properties of AD object

Get-ADUser -Identity [LogonName] -Properties *

3.To retrieve a subset of properties and output in table format

Get-ADUser -Identity [LogonName] -Properties *   | Select-Object samaccountname,name..[Any Property] | Format-Table -Autosize

  1. To retrieve a AD group and its properties, members

  Get-ADGroup -Identity [GroupName] -Properperties * | Select -ExpandProperty Members

  1. To retrieve pwd for IIS App Pool account

Import-Module WebAdministration

  Get-ChildItem -Path IIS:\AppPools\ |

Select-Object name, state, managedRuntimeVersion, managedPipelineMode, @{e={$_.processModel.username};l=”username”}, @{e={$_.processModel.password};l=”password”}, @{e={$_.processModel.identityType};l=”identityType”} |

format-table -AutoSize                    

Creating GMSA (Group Managed Service Account) using PS commands for ADFS Install

10 Sunday Mar 2019

Posted by GIRISH SRINIVASA in ADFS, PowerShell

≈ Leave a comment

Steps for creating GMSA
  1.  Open PS ISE as Administrator run >Add-KdsRootKey -EffectiveTime((get-date).AddHours(-10)) this will output a Guid this will generate a new root key in the Active Directory.
  2. Create a new ADservice account using New-ADServiceAccount [GMSAName] -DNSHostName [adfs.idynamics.com] -ServicePrincipalNames http:/[adfs.idynamics.com]
  3. Set SPN using setspn -s host/adfs.idynamics.com [idynamics]\[GMSAName]$

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2021
  • August 2021
  • July 2021
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • March 2019
  • September 2018
  • February 2018
  • January 2018
  • December 2017
  • January 2017
  • August 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014

Categories

  • ADCS
  • ADFS
  • ADFS 4.0
  • ASP.NET Core
  • Azure
  • Azure AD
  • Azure AD DS
  • Azure B2C
  • CRM 2011
  • CRM2013
  • CRM2015
  • CRM2016
  • Docker
  • Dynamics 365
  • Dynamics 365 CE Online
  • Dynamics 365 Portals
  • Dynamics CE 9
  • Knockout and TypeScript
  • OAuth2.0/OpenIDConnect
  • Power Platform
  • PowerApps
  • PowerShell
  • SharePoint 2019
  • Spkl
  • Uncategorized
  • WebAPI
  • Windows Server 2012
  • Windows Server 2016

Meta

  • Register
  • Log in

Blog at WordPress.com.

  • Follow Following
    • Information Dynamics
    • Already have a WordPress.com account? Log in now.
    • Information Dynamics
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar