-1
votes
1answer
20 views

Query AD Users from date [closed]

How can I query users in AD that have been added since an specific date and that their user logon name starts with UTX ? Im guessing I need to do it with powershell but I have very little knowledge. ...
2
votes
1answer
37 views

How do I set “CustomAttribute6” for a regular AD user?

I'm trying to set AD attribute 6 in Powershell to update a user who has no mailbox, and isn't an exchange contact; and is only an AD user ObjectClass : user The command I'm using is: get-adobject ...
2
votes
2answers
121 views

How can I set an arbitrary (non default) attribute for an AD user or AD Contact?

I have AD Users, or contacts that are not Exchange Mailbox users, or contacts. I also have a SSO system (Ping Identity... technology similar to Microsoft ADFS), where it leverages the AD Schema ...
1
vote
2answers
77 views

PowerShell - finding users who are Inactive AND not disabled

I wrote this cmdlet: Search-ADAccount -filter {(enabled -eq $true)} -Users Only -SearchBase "ou=FirstOU,dc=domain,dc=com" -AccountInactive -TimeSpan 30 But it outputs an error: Search-ADAccount : ...
3
votes
1answer
206 views

PowerShell - Finding all of users' group memberships and kicking it out of them

as title says, I have to find all the groups that the user is a member of, and deleting its membership from all of them. I've tried this: get-adgroup -filter * | where {(Get-ADGroupMember $_ | ...
1
vote
2answers
170 views

PowerShell - Limit the search to only one OU

Ive got this cmdlet and I'd like to limit the results to only one OU: Get-ADUser -Filter {(Enabled -eq $false)} | ? { ($_.distinguishedname -notlike '*Disabled Users*') } Now Ive tried to use ...
3
votes
3answers
236 views

PowerShell script that should find disabled users that are not in a specific OU outputs users from that OU as well

Hey I've got this cmdlet here: Get-ADUser -filter {(distinguishedName -notlike "Disabled Users") -and (enabled -eq $false)} -searchBase "ou=FirstOU,dc=domain,dc=com" I've built it to find disabled ...
0
votes
1answer
23 views

Powershell waiting for more parameters when asking for all users from a specific OU?

I want to get all the users from OU "myusers" so I have this cmdlet right here: get-aduser -filter * -searchbase"ou=myusers,dc=domain,dc=com" But when Im running it, powershell prints a >> ...
0
votes
1answer
58 views

Powershell - check if all users in a specific OU are disabled, disable if not

I tried to search for it but I didn't find anything. Could someone help me out with an example of a script that would do this?
18
votes
3answers
330 views

How do I delete this orphaned Active Directory computer object (preferably with PowerShell)?

I'm working from a Windows 7 workstation, with PowerShell v2.0, and trying to delete a particular (orphaned?) object from the LostAndFound container in a 2008 R2 FL forest and domain with the Active ...
2
votes
1answer
104 views

Powershell - Test user credentials in AD, with password reset

I can successfully use Powershell to tell if a user authenticates in Active Directory: Function Test-ADAuthentication { param($username,$password) (new-object directoryservices.directoryentry ...
3
votes
3answers
91 views

Adding remote machine to AD via Powershell

So I have a powershell script, Add-Computer -ComputerName $computername -LocalCredential $computername\admin -DomainName $domain -Credential domain\$username -Force -Restart So if I have a machine ...
0
votes
0answers
28 views

Run active directory logon script as an admin user [duplicate]

I have a logon (powershell)script for a certain non-admin user. The script retrieves some files from a server and places them in certain folders on the machine (and some other stuff as well). I don't ...
5
votes
1answer
494 views

Powershell query lastlogondate (lastlogontimestamp) returning mostly blank values (not matching the ADSIedit value for corresponding user attribute)

I am running a very short script to simply print out all users and their last logon time: get-aduser -filter * -property * |ft name, lastlogondate I noticed only a small handful of users have a ...
4
votes
6answers
345 views

Powershell assistance for Active Directory Cleanup

I just started a contract to clean up an Active Directory system for a large company. I was told it would be quite the busy work but after reviewing the system and seeing how disorganized and messy it ...
1
vote
1answer
85 views

What do the error messages and codes mean when creating and installing Managed Service Accounts?

When using the PowerShell Cmdlets for creating and installing Managed Service Accounts, certain errors can be thrown. What does each error mean?
0
votes
1answer
63 views

List current Principals in group Managed Service Accounts

Is there a way to list the current list of all the groups and/or hosts in the PrincipalsAllowedToRetrieveManagedPassword property of a gMSA (group Managed Service Account)? There isn't any help on ...
1
vote
3answers
85 views

Displaying all groups that a user from another domain is a member of

My team and I are stumped on this one. We have two domains at work, OldDomain and NewDomain. We are working on migrating from OldDomain to NewDomain as mandated by ParentCompany. The trust is one ...
0
votes
1answer
49 views

New-ADUser -Path syntax?

Where can I find a detailed explanation of the -Path parameter of the New-ADUser command? I want to specify a rather detailed path without calling Set-Location many times to specify where I want the ...
3
votes
2answers
171 views

Powershell - Find users belonging to more than one AD group

I'm new to AD and Powershell so please forgive me if I use the wrong terminology. I have a series of 50+ Active Directory groups called "ABC-something". Every active user needs to belong to exactly ...
-1
votes
1answer
174 views

DNS Record - CHange Current Owenership using Powershell

In DNS I have some computers in the list where the current owner no longer exist so you see the sid info as the Current Owner. I like to change this to the machine_name$. Anyone know how to do this ...
0
votes
1answer
70 views

Powershell - query non-standard group members in an OU?

I am looking to create a script which will only show users in an OU who are members of "non-standard" groups. For example, all users in the "Accounting" OU will be members of at least one group with ...
4
votes
1answer
233 views

PowerShell DSC Group Resource - “Could not find a principal with the provided name”

I am trying to use PowerShell DSC to add a domain group to the local administrators group. Here is the code: Configuration TestSetup { Node localhost { Group Administrators { ...
0
votes
0answers
61 views

Why AD DS user is able to write to ADLDS(ADAM) container(user is neither imported nor added as foreignsecurityprincipal)?PS/dsacls cmd to fix it-DENY

I have installed 'AD LDS' instance on one of my windows server 2012 which is part of a domain. I brought few users (windows security principals to 'AD LDS') as 'ForeignSecurityPrincipals' from AD DS ...
0
votes
1answer
292 views

Managing inherited mailbox permissions in Exchange 2007

Reviewing the Full Access permissions on a mailbox using Exchange Management Console (EMC) does not show you the whole picture. Example - EMC shows no permissions for the account Domain\administrator ...
3
votes
1answer
211 views

How can a set a Security Group's email address using PowerShell?

I need to create many groups with email addresses. I would prefer to use Security Groups to reduce the number of groups we have to maintain, otherwise we'd have an identical Distribution Group for ...
0
votes
0answers
178 views

ldifde command is failing with "Invalid Parameter: Bad argument '-i'. And also any equivalent PS Cmdlet?

OS - Windows Server 2008 R2 Localhost: DC as well as running an AD LDS instance Here are the command(s) I used: ldifde -i -u -f differences.ldf -s localhost:50004 -b myUserAccount MyDomain ...
0
votes
0answers
75 views

scurity tab is missing in ADSI Edit for AD Lightweigh Service instancess. (authorizing users in AD LDS)

I am new to AD LDS. I have installed AD LDS instance in my Windows Server 2008 R2 and 2012 servers as I want to you use AD LDS instance for directory services for my app. I am able to install the ...
3
votes
2answers
244 views

Convert Get-ADPrincipalGroupMembership such that I can write it to the notes field

I am writing a PowerShell script to automate putting users on a leave of absence. As part of this process, we remove the user from their DLs if it is a long absence to stop them from coming back to ...
2
votes
1answer
842 views

How to set AD password to expired / to be changed with PowerShell

I need to reset a whole load of user passwords and then set them as expired or "User must change password on next login" The password is easy to change with SetADAccountPassword. Looking at the ...
1
vote
1answer
48 views

Anyone know of a way to find all certs that weren't auto-enrolled?

I'm in the process of moving an Active Directory Certificate Services role over to a new 2012 server. The new server will be issuing new certs and I need to find all certs that weren't handed out by ...
2
votes
1answer
241 views

AD Properties: What is the difference between Modified and modifyTimeStamp

I have found: the modifyTimeStamp is contructed from whenChanged, both of which are not replicated. However, I have not been able to find a definition or explanation for the Modified property, though ...
2
votes
2answers
550 views

How to collect Security Event Logs for a single category via Powershell

I am trying to write a script which collects security log from all of our domain controllers hourly and stores them remotely; i can collect the security logs , but is there a way to collect the ...
2
votes
1answer
104 views

How to export computers from Active Directory to XML using Powershell?

I am trying to create a powershell scripts for Remote Desktop Connection Manager using the active directory module. My first thought was get a list of computers in AD and parse them out into XML ...
2
votes
2answers
96 views

Running powershell commands ruined the users

The computer where the script is executing is in the one domain, I'll call it internal domain. Users which are tested are in the other (external) domain. I made a script to check if user exist in ...
4
votes
2answers
1k views

Find computers in domain with static IPs - PowerShell

let me start by saying I'm not good at all in writing scripts or troubleshooting them, thus me being here :) I'm trying to find all the computers in a windows domain network that are using static IP ...
8
votes
2answers
385 views

Detecting AD Site options using PowerShell

How can I use PowerShell to find AD site options like +IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED in PowerShell? I've been playing around with the following command, but can't get it to spit out anything ...
3
votes
1answer
208 views

Powershell: get-qadcomputer command

Get-QADComputer -NotLoggedOnFor 90 -SearchRoot 'doman.name/OU1/OU2' I would like to use a variable for the last OU ex: Get-QADComputer -NotLoggedOnFor 90 -SearchRoot 'doman.name/OU1/$OU2' I get ...
1
vote
1answer
595 views

New-ADGroup Parameter for “OtherAttributes” ADGroup Email Address?

Context: I'm trying to create an Active Directory Group with an Email address using PowerShell. Question: What is the corresponding attribute name for the "Email" field? I've searched around the web ...
3
votes
2answers
232 views

Double subnets for a site (AD)

I am trying to create Subnets in existing Sites loaded in from a .txt file. My code looks like this: <#Add subnets to matching sites#> $i=0 foreach($_ in $subnetList){ ...
2
votes
2answers
389 views

Powershell-move disabled computers to OU

This prints disabled computer accounts to the screen. I want to run a conditional statement against the results and, if true, move them to my "disabled" OU. get-adcomputer -ldapfilter ...
2
votes
4answers
511 views

How can I pull non-default properties from active directory using get-adgroupmember

When I run: get-adgroup -filter {displayname -eq 'groupname'} | get-adgroupmember | format-table name, surname, givenname, officephone The only field that returns is a default property "name". The ...
0
votes
1answer
231 views

Getting AD username from first name and surname in CSV file

I have a CSV file with a list of users' first and last names, with column headers as Firstname and Surname. I'm trying to extract these users' usernames from the directory by importing the CSV file ...
3
votes
1answer
171 views

Using Powershell (RSAT) to reset passwords in AD (Win Server 2008)

I am using a powershell script I found online, trying to use a win7 cpu to remotely change passwords on a Windows Server 2008 via RSAT. Right now, the server 2008 and win7 are VM's, and the win7 cpu ...
1
vote
1answer
167 views

Pass unlock credentials to powershell script

I have a powershell script that is run as a scheduled task and is triggered to run "On workstation unlock". The script is programmed to reconnect an SSTP VPN connection if the connection becomes ...
0
votes
2answers
232 views

Set group permission on folder

I have a folder with lots of subfolders D:\Data\Subfolder1 D:\Data\Subfolder2 D:\Data\Subfolder3 D:\Data\Subfolder4 D:\Data\Subfolder5 ... I need to create three active directory groups ...
2
votes
2answers
103 views

Can you use Powershell Remotely to reset AD passwords for Server 2008

Young intern here with a powershell project. My goal is to use a domain computer with administrative [domain] rights to reset user passwords in AD from our server. In order to do so, I have installed ...
2
votes
1answer
8k views

List All Groups and Their Members with PowerShell on Win2008r2

I am new to powershell, but I've been reading manuals and practiced a little bit. My objective is to List all users in all Security Groups under specified path. I have found the way to do it: ...
1
vote
2answers
138 views

How to use imported text in a variable in powershell

I want an automatic AD unlock with some users. I use this to import the info in a text file Get-EventLog -LogName Security -ComputerName COMP -InstanceId 4740 -Newest 1 | Format-List >> ...
3
votes
1answer
3k views

How to set a default domain controller for all PowerShell AD cmdlets?

All the PowerShell cmdlets in the ActiveDirectory module support being run against a specific domain controller using the -server parameter; but is there any way to set a default DC to use for all ...