All Questions
Tagged with powershell active-directory
3,899
questions
1
vote
1
answer
25
views
extract specific string from the field returned
Class CustomAdInfo {
$UserName
$Group
$Email
$Manager
}
[char] 'y'..[char] 'z' | ForEach-Object {
$getADUserSplat = @{
Filter = "Name -like '$_*'"
...
1
vote
1
answer
53
views
Pull of AD users managers name and email to existing script powershell script
I currently have a script which I am trying to alter, which is able to pull of from AD groups Usernames, Name, Email and Managers:
$ou = 'OU=OUoftheADgroups,OU=My,DC=Domain,DC=net'
Get-ADGroup -Filter ...
1
vote
1
answer
73
views
Unknown value in PowerShell Custom Object
I'm a beginner to PowerShell and Active Directory. I have grabbed below PowerShell script from the internet, intending to get all AD Users of Users type (in the Organization) and his all AD Groups he ...
0
votes
0
answers
42
views
PowerShell is not launching explorer.exe using credentials stored in a .ps1 script - how can I correct the access is denied error that PsExec shows?
It has been a while since I've used PowerShell scripts, but we are trying to automate a process for an older software system in a market that is a few timezones removed from our normal IT crew's ...
1
vote
1
answer
93
views
Powershell 7.4.2 - Get-ADGroupMember | Get-ADUser not working
I am using Powershell 7.4.2. When attempting to run a script like below I got the following the error message.
But , This script works in Powershell 5.1.
Get-ADGroupMember -Identity 'APPS Users' | Get-...
0
votes
1
answer
37
views
Using hash table via powershell
If a user is a member of the "apps users" and/or "apps test users" group, the Value column will display the relevant group information. if a user is not a member of any group, it ...
0
votes
0
answers
39
views
Removing All security groups from AD disabled users powershell script
Kind of new at this, but I'm currently trying to delete all groups from disabled users besides the primary group for sub OU.
Currently my domain environment looks like this
-company.example.com (...
0
votes
0
answers
44
views
Need A powershell script that updates splunk's server.conf to the hostname correctly
Goal of this is to have powershell search my AD Domain and find all machines with the splunk forwarder installed. Then validate if the machine host name matches the server name located in the server....
1
vote
1
answer
70
views
How to make requests to local-hosted Azure Devops Server pats API?
I'm trying to create a PAT on my Azure Devops Server through the restful API, as described here:
https://learn.microsoft.com/en-us/rest/api/azure/devops/tokens/pats/create?view=azure-devops-rest-7.0
I ...
0
votes
1
answer
73
views
Error-the identity property on the argument is null or empty
I'm creating powershell scripts which is to get members from nested security groups in Active Directory.
Some group has members from multi domains.
I ran individually, and it works well.
Could you ...
1
vote
1
answer
57
views
How to get AD group members from a group with members from multiple domains
I want to get member list by using Get-ADGroupMember -Identity targetgroup.
The target group has members which is from domain A and domain B.
This is image
Target group members
member1 (domain A)
...
2
votes
1
answer
63
views
Powershell Foreach Get-ADGroupMember on Array of Group Names Not Returning Consistent Results
I am trying to get a list of all AD group members that are a part of at least one of four groups.
I placed the groups into an array and ran a foreach loop on it, piped into Get-ADUser -Filter * and ...
1
vote
1
answer
34
views
Include AD server name on each record using PowerShell
I was provided with a PowerShell script that was created to get user information from all of our AD servers. Since we are querying multiple AD servers we'd like to include the name of the server for ...
1
vote
1
answer
35
views
PowerShell Out-GridView result
I would like to have a column with the name of the specifics group like ABC_* for each user in the result of Out-GridView.
Get-ADGroup -Filter {Name -like 'ABC_*'} |
Get-ADGroupMember -Recursive |
...
0
votes
1
answer
44
views
How to change the distinguishedName attribute for computer object in AD
How can I change the distinguishedName attribute of a computer object in ad using powershell. I used the following command:
Set-ADComputer -Identity WIN10 -Replace@{"distinguishedName"="...