Skip to content

christophersnay.com

  • Home
  • Education
  • Experience
  • Projects
  • Code Snippets
  • Error Messages
Posted on April 27, 2021 by admin

Get Windows AD Groups for user (PowerShell)

([ADSISEARCHER]"samaccountname=$($env:USERNAME)").Findone().Properties.memberof -replace '^CN=([^,]+).+$','$1'

ref: Stack Overflow

CategoriesCode Snippets TagsPowerShell, Windows

Post navigation

Previous PostPrevious Pass and retrieve data in Mat-Dialog
Next PostNext Automatically / Dynamically create Swagger documentation for all API Endpoints

Tags

  • .NET Core
  • Android
  • Android Studio
  • Angular
  • API
  • Arduino
  • ASP.NET
  • Bitbucket
  • C#
  • cmd
  • CORS
  • curl
  • Dependency Injection
  • Elasticsearch
  • Entity Framework
  • Error
  • Flask
  • git
  • HTTPS
  • IIS
  • Java
  • Jeep
  • JSON
  • Linq
  • Linux
  • MySQL
  • Node.js
  • npm
  • NuGet
  • pip
  • PowerShell
  • Projects
  • Python
  • Raspberry Pi
  • Raspbian
  • Reflection
  • SQL
  • sqlite
  • SSH
  • ssl
  • Swagger
  • Unity
  • Unreal Engine
  • Website
  • Windows
  • facebook
  • twitter
  • linkedin
  • gmail
Proudly powered by WordPress