Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

PowerShell Logon Script

$
0
0

I have a powershell logon script that is governed by group policy.

It works great except one thing.

I have this awesome little piece that goes something like,

$user = (GetADUser -Identity $env:USERNAME -Poperties MemberOf,sAMAccountName | Select-Object MemberOf,sAMAccountName)
if ($user.Memberof -match $someMembershipInAD)
{put a file on their desktop}
However, the client systems do not have the AD module, nor will it be installed.  Is there another way to check the users security memberships? 

Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>