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

Custom Object to function as an Array

Hello,I am trying to create a custom object that just refuses to act as an array. Here is a skeleton copy of the whole script that i am working. It gives me the output when I call it one line at a...

View Article


Image may be NSFW.
Clik here to view.

Get members info from security group into csv file

I am a newbie with powershell and struggling with this, What I need is to run a powershell script daily that will look into a single security group and export that data into a csv file that I will send...

View Article


How to add a string value in registry that has double quotes " "

Hi folks. I've been able to successfully add reg string values by using the get-item -path and new-itemproperty commands in powershell for windows 2012 but am having difficulty adding a value for a reg...

View Article

Backup script

Hi, I'm new in powershell, i wrote a backup script, but for some reason if it runs via scheduler it wont make the correct junktion point.The junktion point should point to...

View Article

Get-Acl / Set-Acl - Error. Please help!

Hi, I want to copy files/folders recurse and with it copy also all ACLs. When i run the script it gaves me the following error. Any idea what am i doing wrong here? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...

View Article


Get-ADComputer not found

I wrote this script to verify that computers are in AD and it works fine with the exception of computers not found.foreach ($puter in (Get-Content computers.txt)) {    ( Get-ADComputer -Identity $puter...

View Article

Powershell explicit remoting for Exchange does not work from module

I am trying to add Remote Implicit functionality to  existing Exchange module to allow users to run Exchange cmdlets from their workstations.Remoting works fine when I use script...

View Article

How to Set or Update Webpart Property Using Powershell Script in SharePoint

In our project we have the situation that we need to update the property of a webpart. Since our site is in production, we couldn't recreate the site. The webpart is on nearly every welcome page and...

View Article


Working with PowerShell DSC for Linux, part 1

PowerShell DSC for Linux caught my attention immediately after it was announced. Being able to control configuration of Linux box with pure PowerShell code is huge for anybody who is interested in...

View Article


Attackers Increase Use of PowerShell, WMI to Evade Detection: Mandiant

Attackers are doing a better job at hiding in the most complex parts of computer operating systems, according to a new report from FireEye-owned Mandiant. Read More

View Article

How to install the PowerShell console extension PSReadLine

The PowerShell console in Windows 8 lacks a host of features that UNIX and Linux admins have enjoyed for decades. Jason Shirk’s PowerShell console extension PSReadLine is a free PowerShell module that...

View Article

#Powershell and Automating SQL Server Builds

Before we get much further here, let’s talk about the fine print. Everything I’m going to talk about doesn’t get around backups, DBCC checks, or other processes we need to address as DBAs. We’re not...

View Article

Using a certificate to encrypt credentials in automated PowerShell scripts

PowerShell is a great way to help automate frequent or repetitive tasks and every now and then these tasks require some form of authentication. You could just store the service account password in the...

View Article


Finding Local Group members on servers

Hello,I found this script Bob wrote and I need to tweak it alittle.I would like to read a list of servers from a text file.I would like the server name in the output.$Computer = get-Content -Path...

View Article

HELP!! New to Powershell and learning.

I have seen some great responses to questions on this forum and people go into great detail when helping others.  With that being said, please bear with me on this.  :)I am working on a project at work...

View Article


Export-CSV centers the column that is being sorted....

I specifically set the variable to align right in the code. It outputs correctly on the screen, but not in the CSV file. How ca i fix it during my export?# Formatted in the ObjectIf($FreeSpace -ge 0)...

View Article

AD Query Question

Hi guys, I'm a newbie to powershell so forgive my newbie question.  I am writing a powershell script to inventory all the servers on our network write that to excel and then use WMI to log into each...

View Article


FTP Download - Multiple Files

I am trying to download multiple files from an FTP site. I have a script for single file download, but I'm not sure how to handle multiple file download.  Any suggestions?I've searched the Internet and...

View Article

Hastable numeric sorting fails

Hi, I am populating a hastable at runtime using a loop. Once done, I try to sort the hastable by value (numeric data), it doesn't seem to work. Sorting by key (string data) works just fine. I have...

View Article

Transportrule exporting as readable format

Hi,Anyone tried exporting transportrules in readable format? I am looking to export (Export-TransportRuleCollection) to csv or HTML format so that I can use that for meeting discussion doc.. I tried...

View Article
Browsing all 6937 articles
Browse latest View live