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

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

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

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


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

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


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

Powershell Deployment Toolkit: Introducing Variables.XML

Following our previous post on how to use PowerShell Deployment Toolkit to deploy System Center, your PDT share is now in place and we can begin to leverage this great tool to help is quickly deploy...

View Article

Bulk Copy Data into SQL Server with PowerShell

The fastest way to get data into SQL Server is to use bulk copy methods, whether you use the old bcp utility or use the same capability in other ways. T-SQL supports the BULK INSERT command as well,...

View Article
Browsing all 6937 articles
Browse latest View live