Query AD w/ Powershell for expiring passwords
I know it's been beaten to death but for some reason I can't find one that fits what I need.All I want is a powershell script to query a specific OU for user accounts with passwords that will expire in...
View ArticleBug with Class and Enum in PowerShell 5?
Co-worker may have uncovered a bug in PowerShell 5.0 with Class and Enum's. Only one Enum allowed per Class? Tested with demonstration code from The Scripting Guy himself and it does NOT work.Feel...
View ArticleMarch PowerShell 2016 - What have you done?
And in a blink of an eye, March has past. Time to share what you've been doing in the PowerShell world! Written some good scripts, a blog post, a good Best Answer here on Spiceworks? This thread is...
View ArticleSetting Environmental Variables PowerShell
Could someone help me out.. new to PowerShell and looking to create the following values in the machine environmental path for part of an installation.This works as expected.. But the if the script is...
View ArticlePowerShell - The FALSE Half of an IF Statement
After beating my head against my desk for the last four hours (have mercy on me, it's Monday), it finally dawned on me to try this as a script and it works. However, when I'm writing, I generally just...
View ArticleQuick script listing counts of active users and computer accounts
I am in a bind and though probably could find this info given more time, that is not an option. Our city counsel is meeting at 6pm and our manager has asked for a quick report of current users and...
View ArticleAdding Remote Printers Using PowerShell for All Users
I'm trying to add a printer from a printer server using the following PowerShell script. The problem is that the printer is only showing up for one user not anyone who logs onto the computer. So, my...
View Articleusing subinacl from powershell fails on service with a space in name
One of the many tasks my script is doing is modifying ACLs on a given server. I achieve this with this little chunk of code:Powershellget-service|ForEach-Object{CMD/C"c:\Program Files (x86)\Windows...
View ArticleHow can I use a variable's property in an if statement?
So I am finding that I need to check a property (like name/powerstate) in some if statements and I am sure there is a quicker/simpler way to do this. Can anyone point me in the right directions?Here is...
View ArticleHow to use powershell to point to a source
I am currently studying my IT Server administration and I'm having trouble installing windows features using powershell. I want to convert server 2012 core to full and I used the following command...
View ArticlePath Too Long error
The Problem is simple I need to find if a security group is giving access to any file.However,I try and run my...
View ArticleWindows Management Framework 5.0 released
Time to upgrade your Windows Management Framework to the new 5.0 release. This will keep you connecting with new security features like Just Enough Administration granular access control to PowerShell...
View ArticlePowershell AD script to report on logged in users for the past 90 days
Hi All,I'm currently trying to get my head around a powershell script and was wondering if someone can assist with this.I would like to run a powershell script as a scheduled task (in Windows) to...
View ArticleCan I get some explanation on Wake on Lan powershell scripting?
Well, I have been messing around with Powershell off and on for about ~8 weeks. I have been able to search AD for computers, create CSVs, add users, and am trying to modify Martin's script for adding...
View ArticleAutomated folder deletion.
Hi All, I am working as a system administrator. In my office there is a process which work separate for one of our organization client. They get the file from the client and then users save the files...
View ArticleFind large character count in Excel Spreadsheet
We use a document management application that auto-populates fields based on logs(Excel Spreadsheets) using SQL SSIS. Occasionally, someone exceeds the 254(5?) character count limit in a single cell in...
View ArticleIF And statment in foreach powershell help
Powershell$names=Import-CSVC:\PowerShell\TerminatedEmployees.csv$Date=Get-Dateforeach($namein$names){Get-ADPrincipalGroupMembership-Identity"$($name.TextBox37)"|selectName|Out-File"C:\Powershell\ADUser...
View ArticlePowershell: Get Active Directory Description properties
Hello, this is a matter of curiosity.At the beginning I'd like to lear how to set a computer descritpion using the PS command Set-AdComputer. And I find itTextSet-ADComputer ComputerName -Description...
View ArticlePowershell: Get-ADGroupMember when you don't know the exact groupe name
Hello, I am trying to list the member of an AD Group.Actually I know the group so I am using:TextGet-ADGroupMember -Identity "GroupName" | ft nameSo I get the meber list.What if I don't know the exact...
View ArticleConnecting to a network printer
The following command works in local machine and shared printer is getting installed.Powershell([wmiclass]"\root\cimv2:Win32_Process").create("cscript...
View Article