Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Browsing all 8411 articles
Browse latest View live

gwmi win32_product error ONLY in win xp

Hi  All,I am creating a script to collect some system information for multiple servers. As a part of it, I am collecting softwares installed in group of machines. I am taking the list of softwares...

View Article


Remove-Item does not work (Permissions) but "cmd /c 'rd /s /q directory' "...

Hallo,I would like to delete a directory of a user with the powershell (I 've run it as administrator):PS C:\Users> Remove-Item DIRECTORY -Force -Recurse    + CategoryInfo          :...

View Article


Restart service remotely using external domain credentials and check status

Hi there,I've been asked by my manager to create a powershell script that will restart the Apache Tomcat service on a remote server located in a different forest.This will be used by our operations...

View Article

Exporting users whose attribute is ot set

Hi,I would like to export only the users whose extensionattribute1 attribute is not set. How do I go about that please?Thanks

View Article

Remove broken DPM Agents with Powershell

I ran into this small problem. I had a node in my DPM and the server was removed but not from the DPM-console. Now i can’t remove it from the normal rightclick on the agents tab. As you can se the...

View Article


Enabling and Using Windows PowerShell Web Access

In Windows Server 2012 Microsoft introduced Windows PowerShell Web Access, a feature that enables you to remotely run PowerShell commands and scripts in a web-based console. You could, for instance,...

View Article

Exclude OU not working

I have this code that will get all users from AD $old = (Get-Date).AddDays(-90).ToFileTime()$ldapFilter = '(pwdLastSet<={0})' -f $oldGet-QADUser -LdapFilter $ldapFilter  -SizeLimit 5000 This returns...

View Article

GPO restricted groups

Hello,How do I configure a restricted group from a existing policy.I will add a new group to the GPO restricted groups.I tried with Set-GPRegistryValue, without success, any idea ?Thanks

View Article


find only service accounts

I have a 2nd issue with AD.  How would I find only Service Accounts from AD?   I like the Qwest tools so I use Get-QADUser but not sure now to find them.  I know that our service accounts do Not follow...

View Article


Trouble with if else statement

First off i'm a a newb at Powershell and scripting for that matter, so I know what my goal is just can't figure out what I'm doing wrong.My goal is have a script that first asks for a server name and...

View Article

Text in windows forms rich text box not updating properly

Not sure if this is the right place for this question. I have written a windows forms powershell script and I have a function in the script that updates a richtextbox that I have in the form.The...

View Article

Foreach loop through multiple CSV files fails after 3rd file

I have a folder with 7 CSV files and I'm attempting to loop through each and parse two cellsThe cell values consist of computer and process name and I'll use the variables in some other copy functionsI...

View Article

Surf WMI Namespaces Safely with WMI Explorer

System Center Configuration Manager (ConfigMgr) relies on the admin's ability to create queries utilizing data available in the Windows Management Instrumentation (WMI) database.Read More

View Article


Start-Transcript

I always run the PS session using Start-Transcript, but the $transcript variable, which is supposed to indicate the file in use, always returns nothing. Why is this?

View Article

Restart list of servers in a file, capture a log file then email results?

Hello - I have read several posts online about how to do this task and I am not finding one that works really.The ask of me is to restart servers from a list inside a text file and reboot them one at a...

View Article


convert Text to objects

My PowerShell skills are very limited and I was hoping to get some help.  I need to convert output text from a legacy CLI tool into objects so that I can better utilize Powershell's capabilities.  The...

View Article

Question regarding LastLogon/LastLogonTimestamp

I wrote a function that will get a users 'True' last logon by checking the LastLogon attribute for the user on every domain controller in the domain and returning the most recent. In most cases, this...

View Article


Need help with Invoke-Expression

Hello everyone!I am in need of assistance with Invoke-Expression. In my script I need to build function names to match the domain the script is being ran in.For example, a function is named as...

View Article

Finding common membership for AD users

Is there a way to derive common AD group membership for a list of user ID's?  I have twenty users that I need to grant permissions to on a share and they all belong to multiple groups.  I'd prefer not...

View Article

Resizing a folder full of JPG

Is there a method to resize the pictures in jpg fromat from a folder. using foreach ($_. in $photos) {'' resize/format image etc etc } the resize needs to be specific 400/351 It is a process i am...

View Article
Browsing all 8411 articles
Browse latest View live


Latest Images