Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

Get Displayname from samaccountname

Hey Gang, Need some help I am trying to get the display name from Samaccount this is this what I have  $user = Get-Content 'C:\Temp\User.txt' $results = @() Foreach($user in $Users) {$result...

View Article


logonworkstation attribute multiple users and multiple computer names

I am working on populating the "logonworkstations" attribute with multiple computernames for multiple users. I have a simple script to populate the "logonworkstations" attribute from a csv file but I...

View Article


Script help for GPO

I have a powershell script that I am using as a computer startup script to install Lync 2013 and it works fine, here is my issue. I created a test OU and applied my GPO to that OU I also created a...

View Article

Import users from CSV file

Hello,I'm trying to import users from a CSV file into AD.This is what I've got so far:Import-Csv .\test.csv | foreach-object { New-ADUser -Title $_.UID -Surname $_.Surname -GivenName $_.GivenName...

View Article

Updating AD user information with Powershell

Ok I am very new to this. I have been watching videos and reading through various forums to learn what little powershell I currently know. Any help with this is greatly appreciated.I currently have to...

View Article


Script for alarm and music

I was hoping someone could help me find a script that was an alarm (say for 7am) and would start up wmp and start randomly playing a song.  I would appreciate if anyone could cash in any ideas, I find...

View Article

get-adcomputer question

 im trying to allow the ability to type partial names into the read-host prompt... example to type in "hsc123" but get all computers with the name hsc12301, hsc12302, hsc12303, etc. I am a newbie when...

View Article

Replacing "Everyone" with "Authenticated Users" for Print$ with PowerShell

Good Evening all.  I am currently trying to figure out how to either 1) replace the existing Everyone group on the Print$ share with Authenticated Users or 2) use PowerShell to add Authenticated Users...

View Article


Populating extensionattribute10 for multiple users

I have  4750 active directory accounts with extensionAttribute10 is emptyI would like to populate that field extensionAttribute 10 with firstname.lastname@company.caHow would I do this in powershell? I...

View Article


Is it possible to pass an array of filter criteria to ldap filter?

What I'm trying to do is set the filter criteria in the script below.  Instead of having: $strFilter =...

View Article

Tracking events: http requests and Lync messages

Hello everybody.I'm wondering whether it's possible to track events without 3d party monitoring software. I know about WMI events, however there are two tasks impossible to handle with WMI. These are...

View Article

Extracting Data from XML

It has been a long time since I have posted here, but I'm stuck on a powershell/xml question.I've written a powershell script that reads in a lot of data from some cmdlets and generates an XML...

View Article

Running job on remote computer as scheduled job

There seems to be times and reasons why running a powershell command or script on a remote computer as a scheduled job is a neccesity. I have been trying to come up with a way to do this on all my...

View Article


How to highlight a cell in Excel a certain color?

I found this code online and it works perfect.      $erroractionpreference = “SilentlyContinue” $a = New-Object -comobject Excel.Application $a.visible = $True $b = $a.Workbooks.Add() $c =...

View Article

is Powershell like Perl?

Sorry for the simple question.  Seems I can't use my Perl oneliners at work anymore... but I can use Powershell...  So before i try to learn it.... So.. can i use powershell to write one liners that...

View Article


Looking to improve this log parser

Since iTunes doesn't really provide much in the way of logging I am looking through our IIS Logs and trying to pull out specific requests for mp3/mp4 files or podcast requests as a way of at least...

View Article

can't delete a file

This code works when I run it against my local computer.  $packageID = Read-Host    remove-item c:\temp\tmp\remove\$packageID.*    remove-item c:\temp\tmp\remove2\$packageID.* The file $packageID.* was...

View Article


Remote powershell execution

I have a mixture of Windows 7 and XP machines that I need to setup to enable them as clients to remote execute a SQL SSIS package. The package and RDBMS is located on a Windows 2008 server. On the...

View Article

Run the batch file in remote system

I have batch file which is residing in the remote system (C:\RunJob.bat)   Batch file contains code to open notepad.exeRemote system name : RemoteSysLocal system name : MohanSysHow do i run the...

View Article

Add-Type -Path c:\scripts\validateMatches.dll failing.

I can get Add-Type -Path c:\scripts\validateMatches.vb to work with the script below but trying to reference the compiled version  fails. This script just adds a [ValidateMatches] type and is identical...

View Article
Browsing all 10624 articles
Browse latest View live