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

Trimming down an unknown string

I have a section code in a program of mine that's supposed to trim off parts of a folder name to get a version number that's on the folder name. Typically the folders are names such...

View Article


Manage Azure SQL Databases with PowerShell

In previous posts (see links below), I've talked about Microsoft Azure virtual machines (VMs), and how similar they are to your on-premises servers with respect to management. In many cases, you don't...

View Article


[Quest Cmdlets] - Retrieving specific text from an attribute

Good Afternoon Everyone,Our user objects have the 'comment' attribute filled with quite a lot of information that gets read by a password manager product we use.  I need to be able to retrieve just the...

View Article

exception error importing into active directory help!

I'm running a script to import user infor from csv into active directory, I'm not sure why i'm getting this error: Get-ADUser : The search filter cannot be recognizedAt C:\addupdateadusers.ps1:80...

View Article

Find computer which has not been updated for 30 days or more

Hi,Im quite new to Powershell and im trying to figure out how to create a script which looks at computers within a OU and then try to find computers which has not been updated for 30 Days or more.There...

View Article


finding IP address

I'm trying to use test-connection to find out the IP address of machines to see what subnet they are on.   I know test-connection contains the IP address yet I can't seem to check for it.  All of the...

View Article

Finding users who logged onto workstations

The following is my attempt to discover the workstations in a domain and find out which user was the last person on that workstation.  My trouble is getting the userID from the line which has "Account...

View Article

Powershell office 2013 and 365 help

Hi, Normal 0 21 false false false DA X-NONE X-NONEI need the following powershell script and i cant figure out how to make this.------------ pseudo powershell  code ----------Tjeck for office 2013...

View Article


Automate the creation of minidumps of several instances of w3wp.exe process

Greetings, This is a two-part question.  I am trying to automate a series of tasks to collect diagnostic data for an authentication failure we are experiencing every now and then on our web server...

View Article


Enabling IIS Remote Management Using PowerShell

Managing Microsoft IIS Web servers remotely using the graphical tool is fairly simple to enable if you're sitting at the Web server. But if you're like me and host many servers in different locations...

View Article

Modify registry value on list of computers

HiCan anyone please help me with a powershell script that can modify registry key on a list of remote computers and export the results to csv? Basically, I need to modify a product name in add/remove...

View Article

Powershell script to find Windows version and Internet Explorer version...

I have created a short script to run through a list of computers and find what version of Windows is running and the version of Internet explorer.  It doesn't reflect the correct version of IE all the...

View Article

Set multiple ObjectAttributes in one command?

Good Afternoon All,Is it possible to set multiple attributes in one line using powershell?Import-CSV"$CSV"|foreach {Set-QADUser-Identity$_.mail -ObjectAttributes @{comment=""} -WhatIf}I would also like...

View Article


Install Powershell 4 Remotely

Hi,Trying to upgrade PoSh to v4 on several machines and having no luck.  Worked for a few with Chocolatey, but then I started getting Exit Code 5.  So I went down a new path and found a script...

View Article

Compare two csv files and ouput the difference

HiI have two csv filesOldcsv ServerIPStateBox1192.168.25.1EnabledBox2192.168.25.2EnabledBox3192.168.25.3Enabled...

View Article


workflows

Hello guysplease tel me the truth, where is my faultI was trying to archive a few files (3 files 50GB each) simultaniously in such way (pre)#aliasset-alias sz "$env:ProgramFiles\7-Zip\7z.exe"#archive...

View Article

adding a user to a remote machine using powershell

Hello Im trying to add domain users to the local machine administrator group with the script below $global:user = Read-Host "what is the username"$machine = Read-Host "what is the machine name"...

View Article


PowerShell error message

I just updated my Windows 2008 R2 SP1 Server with Powershell 3.0. My login script creates a substitute drive letter to a home directory on the network. So if I type Subst in the command prompt the...

View Article

Need results and error output to a file

$path = Split-Path -parent $MyInvocation.MyCommand.Definition$importfile = $path + "\litusers.csv"$ccsfusers=Import-CSV $importfile$Total = $ccsfusers.Count$Count = 1 ForEach ($person in $ccsfusers){...

View Article

Background Job stuck when using New-PSDrive

Hi,I've a little Powershell script, it creates New Background Job, who contains New-PsDrive and Copy-Item.Start-Job-ScriptBlock...

View Article
Browsing all 6937 articles
Browse latest View live