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

Capture Output problem ?

Hi guys, im a beginner at powershell, and i'm stuck.I'm trying to capture the output from a powershell script that is started from a batch file. I triede all the usual thing like, > and Out-file "...

View Article


Transform Ouput to a PsCustomObject

Hello,I am a little bit stuck with a script and I am wondering if someone here could be so kind to help me out.What I am trying to achieve is to parse the output from a external command which currently...

View Article


NetTCPIP Module Server 2008 r2

Soory for my bad english (french)-------I have install the .net Framework 4.5.1 and the .net Managment Framework 4 on a Server 2008 r2. The add of the mnagment framework make that the version of...

View Article

unable to write powershell command output to variable

Hi All, i am trying to find if firefox is blocked or not in a system. I have imported module from remy's website http://code.remyservices.net/powershell-firefoxpref/wiki/Home .Thanks to remy for his...

View Article

Excel conditional

Hello experts! I am trying to read the number in a Excel cell (D2) If it is greater than 30 then I want it to replace the cell (F2) with "Good". Then I will need it to page down to cell (D3) and do the...

View Article


Some questions about csv handling

Function Get-Answers {Write-Host "Hi Guys"i am new to his great website, forum and powershell. During my explorations of unknown continent of PowerShell i encountered some csv files.While playing with...

View Article

set network interface settings?

On our 2008 R2 servers we need to check the "Internet Protocol Version 6 (TCP/IPv6)" tick box.   I found this command Set-NetIPv6Protocol but it does not seem to have a -switch to check/uncheck this...

View Article

Introducing PowerShell support for Azure Site Recovery

Last week we announced PowerShell support for recovery between two Hyper-V sites managed by Azure Site Recovery. The ASR cmdlets can be used to enable protection for virtual machines and performing...

View Article


Test Authentication to Windows Servers

I have been tasked to write a powershell script to test the authentication to a number of our windows server with a particular username and password and output the results. Has anyone done this before...

View Article


Creating custom object and selecting information

I have a directory where admins are dumping files pertaining to workstations located at each building. Within each CSV file, I would like to extract two columns (Header Client IP Address and Name)....

View Article

Smart Card UserAccountControl Check

Great site by the way!!  I am new to powershell, and have only written a few scripts.  Currently I am working on a logon script that toggles the useraccountcontrol of "smart card required".  We are...

View Article

If statement in foreach loop

Hello,I'm trying to write a script to see if a file exists in a folder and if it does write the name of the directory out to the console. Two things are happening, I sometimes get the right output, but...

View Article

Working with "If / ElseIf / Else"

I have a fairly complicated set of statements using ""If / ElseIf / Else" to determine the $Path (OU) and $Group (Security Group) for students in a school district.Basically, the "If" tests the School...

View Article


Best Software for Large Backup

Hello to all, I have 5 external hard drives totaling around 10 to 15TB of storage, most of which I have filled. Anyway, if one ever died, I would cry. So I need to find a cost efficient way to back my...

View Article

Workflows and Rebootin

I am trying to use a workflow to perform part of a process then reboot then be able to continue and complete the process. The test code I have below is all completing before the reboot. What am I...

View Article


Searching the security Logs

I want to scan the security event viewer log to find out who added a user to the local administrator group.  So here is where I am at: get-eventlog -logname "security" -computername TestMachine |...

View Article

Changing pwdlastset attribute

I have a script that resets the pwdlastset attribute to the current date.  I have a couple of questions.1.)  Is it possible to set pwdlastset to a random time within a set period.  Example would be the...

View Article


Newbie . Connecting to PostgreSql DB

Hi I am trying to connecting to postgre database and pull the data by querying a database and send an email based on the values returned from the query. I was able to connect to the database and run...

View Article

Restart server & then email

I am trying to write a script to restart a server and then email when the restart is done.I started with this basic command:  Restart-Computer -ComputerName <string[ ]>,But I can't get it into a...

View Article

Get-adcomputer script to CSV

Hey guys,I read through a ton of posts between here and China and I just can't seem to figure this out.I'm running the below script to check my computers which is a simple txt file with computer names...

View Article
Browsing all 6937 articles
Browse latest View live