Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

How do I trim a line in a .txt file and append the result in the same file.

I have a .txt file of the following structure: License Applied to NGP Application Server:\\qafile2\Leonardo\Feature Data\License...

View Article


How Do I [Split Replace RegEx]

I'm trying to modify or replace text in a string, which seems to me, it should be fairly east to do. But examples I've seen and read about appear to go off in other directions or end up with results...

View Article


Cannot add a new UPN-Suffix in a trusted domain/Forest with powershell

Hi everyoneI´m trying to add a new UPN suffix, in a different forest/domain than my multi tenant Exchange 2013 domain. There is a transitive trust between the two domains/forests. Import-Module...

View Article

FInd users where initials is empty

HII would like to extract all users thaht don't have anything in the field intials? Get-ADUser -Filter * | where { $_.initials -eq " " } | Select-Object -Property SamAccountName,surnameu Thank you

View Article

Export to CSV into seperate columns

Hey Guys :)I have a script from one of the guys at work that I'm trying to modify, sorry but I'm still a total noob and still haven't had time to do basic powershell training, just flat out doing...

View Article


Group Policy Scripting

Hi,Excuse me for posting a GPO question in AD forum... It would seem the old forum is obsolete? I'm looking to automate GPO Deployement... There are many ways to Rome...When it comes to Domain Password...

View Article

Read from CSV and Compare info against AD

Hello,I have a CSV file that I am treating as Master file. Not all of the headers from the CSV are part of a user in AD. The master CSV has the following headers:"Last Name","First Name","Last 4...

View Article

Extract profilepath is empty

Hi,I am trying to list our AD users along with their profile paths however when I run the command below it lists all the users but the profile paths are all empty even though I know that many users...

View Article


Piping Get-Acl output to icacls.exe

Hello everybody,my first post here, I'm Luka and I hope to get more proficient with PS.In a production environemnt, I have a messed up folder with inconsistent permissions. I was hoping to be able to...

View Article


Powershell CSV report usernames & Phone Numbers - but exclude area code?

HowdyI am working on a PowerShell report of user names, First, Last, and their phone number populated in AD.But the request is to take out the area code.  That's not something I've done before, can...

View Article

Require a script to find the computer objects in multiple domain

Hi All, I have around 150 Windows servers to which I need to find out if these exists in AD or not.The problem is I have around 10 domains and I need to find out the servers exist in those 10 domains...

View Article

Delete disabled AD Accounts that are over 2 years old

Hi Hoping you can help.I have been asked to delete all DISABLED AD accounts where the last logon was over 2 years ago. All our disabled accounts are in 1 OU, so I would like to run the powershell...

View Article

Bulk Set Manager

Hi.I have this powershell script. For some reason it will change all other properties but Manager - and I cannot figure out why - any ideas?My csv contains Manager stated as SamAccountName.mport-Module...

View Article


Disable AD Computer from txt file and move it to target OU

This is the script I have, but something is not right. Import-Module ActiveDirectory$computers = get-content "C:\disabled computer.txt"foreach-object{$computer | disable-adaccount$computer |...

View Article

AD member list Script

First time posting but hello there users!I am novice, at best, and I was wondering if I could get a script that shows all the users of a certain security group while also filtering it to only show...

View Article


remove users disable from a group

Hi I would like to remove all the user disable in a specific group. Because I have users in a group that are no more used (disabe in the active directory). How can I do that: Remove-QADGroupMember...

View Article

How to add user to multiple groups from .csv

Hi All,I have tried researching previous posts, but didn't find anything in relation to adding users to multiple groups from .CSV file import.  I have been able to get the below script to work on...

View Article


Shared Printer and its associated machines

Hi I would like to run a powershell script that looks at a specific shared network printer in AD and returns a list of all PCs\laptops that are attached to it in the form of a CSV file. Is this...

View Article

Image may be NSFW.
Clik here to view.

Adding Users to AD in Bulk From CSV File

 I am trying to write a script that will add users from a csv file and then add them to a group. I am currently testing with just one user at the is time. The csv file has the following headers...

View Article

Powershell script to move user to new OU

Currently I have a PowerShell script to create new users, modify settings and set a AD Group or disable the user.I receive my input file and at the end of line there is a code at tells the script what...

View Article
Browsing all 10624 articles
Browse latest View live