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

Adding global groups to local groups

Hello,Is there a power shell script that would allow me to add global groups created on DC to local groups on various servers without having to do this manually?  Servers are in a single domain. 

View Article


Parsing results from file and showing in email body

Having issues getting this script that was written for v1.0 to work. I have everything working except specifically getting the results of $bodytask" into the email body. I've made some modifications...

View Article


Automated PowerShell Reports Delivered to Your Inbox

Automatically create and deliver Active Directory reports.Read More

View Article

Replace a substring using Powershell

Hi,I've got a job, one step of which adds some articles into a publication:$DBScriptFile ="C:\Scripts\RO_replication.sql"#SCRIPTInvoke-Sqlcmd -ServerInstance localhost -database master -InputFile...

View Article

How to put two IF statements in a variable?

HelloIs ist possible to put IF statements in a variable? I have six different rules and I don't want to have six times the hole code in there. So I would like to have on code sniplet and just replace...

View Article


Fetching Application Tab value of Task Manager.

We have scenario where we need to fetch all the values of the application running in the Task Manager.We are so far able to get single instance of the application (Suppose 4 IE is opened so we get just...

View Article

Compare two CSV files

Hi Team,I am working on a script that having hard time with it and requesting your help.My objective:1) Read a CSV file. Members column has multivalued property thus split the membersDisplay...

View Article

Foreach-Paralle​l - Parallel PowerShell

This function will take in a script or scriptblock, and run it against objects you pipe to it.  It uses runspaces, as there are many situations where jobs or PSRemoting are not appropriate.Read More

View Article


ConfigMgr and PowerShell-Preparing Your Environment – Part II

Yesterday, we walked through the process of launching PowerShell from the ConfigMgr console as well as importing the ConfigMgr module from the PowerShell command line.  Here’s a little additional...

View Article


ConfigMgr and PowerShell-Preparing Your Environment

ConfigMgr 2012 SP1 contains almost everything you need to get started with PowerShell and the new ConfigMgr cmdlets. When you install an Admin console (whether local to the site server or on a remote...

View Article

How to AutoLogon Microsoft Windows using PowerShell

Do you ever just want Windows Server, or client for that matter, to automatically logon? This is a horrible idea in production and violates every security rule you can imagine. So don’t do this!...

View Article

Group Membership From a csv file

Team, I have an easy question hopefully i am working on a script that adds user from a csv file based off of employee id. I am receiving file from a system every Monday. The script works but there is a...

View Article

Formatting the output

HiI feel I am almost here with this but I am not able to quiet get the formatting right.When I run the following script I get the results I am after but the only column that lines up is the Uptime...

View Article


Building pauses in-between objects in commands

I am runnin a script that is deleting backup over 4 days old.  The files are so large that it is casuing problems on my storage when it starts to delete to many at once. I want to build a pause into my...

View Article

Active Directory WMI Event Watcher for a modification on a group within in...

Powershell question, I want to register a WMI Event watcher to monitor an AD group modification and I am getting a WMI quota violation. Any thoughts on how to do this or optimize the WQL query?$query =...

View Article


Passing a variable to invoke-sqlcmd

 Hi,I am trying to pass a script to an Invoke-Sqlcmd.  For this I need to modify the script with some replacements as below and then output it into a temp file, send that temp file to Invoke-Sqlcmd and...

View Article

Using some sort of wildcards in replacement

Hi,I've got a script file to create a database as below.  It has strings like "N'S:\SQLData\" and "N'R:\SQLLogs\".  They may also look like: "N'T:\SQLData\" and "N'U:\SQLLogs\".    There are three of...

View Article


How to ask user to supply param values while running a .ps1 script?

Like the "Clear-Variable" cmdlet, if user didn't pass any param to that command, it will ask user to supply values for parameters.How to make that effect in a .ps1 script?------------------PS...

View Article

Software Installation with Powershell???

Hi all, Currently within my org., we use SCCM and VBscripts to install software packages. I am in the process of developping my own skills for various MS exams, but would like to take this (as in some...

View Article

Windows PowerShell: Make the second hop

Windows PowerShell Remoting is an amazing way to manage multiple remote computers as easily as if you were only managing one. In a domain environment, it just works. Having said that, there are a few...

View Article
Browsing all 8583 articles
Browse latest View live


Latest Images