Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Custom attribute not shown

Hi, I extended the user class in Active Directory with an additional attribute -> "CostCenter". When i check a user object with ADSIEDIT, i can see the custom attribute. However when i get the user...

View Article


Reading temporary data from workstations

Good morning,First I'm not a programmer, I write some code but looping gets me one loop is easy two loops gets me.  I will first explain what I'm trying to do and then show you my code.I'm trying to...

View Article


$_ '-msDS-cloudExtensionAttribute1' attribute not recognised?

Hi - I am trying to populate the  -msDS-cloudExtensionAttribute1  field in users AD accounts with their givenname_surnameImport-Module ActiveDirectory  Get-ADUser -filter * -Searchbase...

View Article

How can I add a member to an AD Group by passing an object property?

Function CreateUser($fname,$lname) { $0bj = New-ADUser -name "$fname $lname" ` -GivenName $fname ` -Surname $lname ` -DisplayName "$fname $lname" ` -SamAccountName $fname ` Add-ADGroupMember -Identity...

View Article

send active directory password rule via an email

HelloCan anyone help me scripting, we would like to send out an automated email to all mgmt heads about the AD password rules.ThanksNaveen Rao

View Article


Traverse through events in Security logs generated after the last event read...

Here is a script that will filter events from Security logs for Logon types and the primary focus here is that the below code should output results or should execute on the logs generated after the...

View Article

get-childitem to list directories, but only if they have an extension

I know how to use GCI. I know how to use it to list directories only, but how can I use it to list directories that have an extension?I'm guessing it's going to be something along the lines ofgci...

View Article

Image may be NSFW.
Clik here to view.

get-adgroup -filter * | I want to get more than just SAMAccountName...

Hello,PowerShell maestro Mike Laughlin helped me develop this .ps1 script which gathers a .csv list of all AD groups with all their AD user account members (GROUP <group name> and MEMBER...

View Article


Create user in ADAM instance with powershell

HiI was wondering if you could help me with the ability to create a user in AD / Adam? I am trying to write the powershell code to create users for Teradata connectivity. the manual process is to use...

View Article


Script takes too long to filter results from Security logs..

Here is a script that takes more than 20 minutes to give me results for the latest 5 minutes from Security logs. The size of security logs before it overrides is 1 GB in about 40 minutes. The script...

View Article

Can someone please help me extract all users, but properties of one AD...

Hi everyone. We use the pager field in AD for printer pins. I'd like to extract a list of all the users, with the properties of the pager field to a csv file. The reason is that we can't duplicated...

View Article

Access denied when importing a certificate

Hi,I get an Access denied error when trying importing a certificate. PS C:\Deploy\Licenses> Import-Certificate -FilePath "C:\Deploy\Licenses\Certificates\somecertificate.cer" -CertStoreLocation...

View Article

Delete folders older than X days via SQL Agent Job

I've been trying to run the script below which is on my disk via a SQL Agent job with parameters but it just runs forever and never deletes any content.# Set limit -x days $limit =...

View Article


Start-Process : This command cannot be run due to the error: The system...

Hi, I need some help with my script. It copies the file to the remote laptops but when it needs to install the .exe it fails.If I run 1 line at the time in Powershell ISE, then it works. Somebody has...

View Article

Get-Childitem with millions of files

Hello all,My task is to create a report with all subfolders in a given path, sorted after the newest LastWriteTime on any file in the folder. The ultimate reason is to determine which folders have been...

View Article


Performance of "Get-PartitionSupportedSize" on 2012 R2

Hi,I'm running at Server 2012 R2 file server cluster on VMs, using shared VHDXs. I have scripted a process for expanding a shared VHDX (basically, detaching the VHDX from all nodes, adding space,...

View Article

Need to use -credential in get-wmiobject

Hi,I would like to remotely enumerate printers on our 2012r2 print server from a Windows 7 box. I am logged into the Win7 box with a domain account that is in the local admins group on the print...

View Article


Help! I need a simple powershell command to display all folders & files over...

Can anyone help me please? I'm trying in vain to identify any files or folders I have in a directory over the 260 char limit.my powershell knowledge is quite limited so I've hit the wall with ideas.Any...

View Article

Powershell - Copy a list of files to multiple servers and backup exisiting files

Hello.. I would like to have assistance from Powershell gurus.. My scenario is; I want to automate a task to copy some .dll files from one location to multiple servers but before copying those files...

View Article

Get Password Not Expire From Script

I'm currently working with this script and I would like to add password does not expire in the .csv to either true or false if that box is checked. Can you guys help? $NumDays = 0 $LogDir =...

View Article
Browsing all 21975 articles
Browse latest View live


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