Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

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 Article


Bug 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 Article


March 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 Article

Setting 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 Article

PowerShell - 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 Article


Quick 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 Article

Adding 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 Article

using 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 Article


How 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 Article


How 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 Article

Path 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 Article

Windows 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 Article

Powershell 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 Article


Can 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 Article

Automated 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 Article


Find 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 Article

IF 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 Article


Powershell: 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 Article

Powershell: 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 Article

Connecting 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
Browsing all 15370 articles
Browse latest View live


Latest Images

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