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

code runs without error and without results

This code Works.  $Searcher = New-Object DirectoryServices.DirectorySearcher$Searcher.Filter = '(&(objectCategory=computer)(anr=mg10011001))'$Searcher.SearchRoot =...

View Article


First Look at Powershell 5

Last time I wrote on this blog, Powershell 4 was king and it boasted more than 1300 cmdlets on its Windows 2012 R2 platform.Read More

View Article


Apple’s Swift programming language > PowerShell

This post, Apple’s Swift programming language inspired by Groovy, caught my attention and it got me thinking about PowerShell. When I first started playing with PowerShell, I knew it was a programmable...

View Article

Exchange 2013 Dynamic Distribution Lists

I've been looking all over for a possible answer to this, and hoping I can find some help here. We use Exchange 2013 Dynamic Distribution lists in the environment (quite heavily too), to simplify user...

View Article

back to formatting !!

I have this code that I hijacked from the internet.   $UserName = Read-Host "Please enter the users login ID"$Root = [ADSI]''$searcher = new-object...

View Article


installing PSv3 - "The update does not apply to your system"

Hi,Trying to install PS v 3 on a Windows Server 2008 Standard 64bit with SP2. Dotnet4 Full is installed and followed this MS articles...

View Article

Deploy elevated powershell script with SCCM 2012

Hello all,I've been using Powershell for a while now and I really like it, who couldn't?  I've ran into an issue that I can't figure out and not even sure if it's possible.I have a Powershell script...

View Article

Reading multi valued attributes from AD and writing into CSV.

Hello, I'm relatively new to powershell. I've been tasked with getting some data from Active Directory. I'm searching for objects of class: PrintQueue in Active Directory. One of the attributes of this...

View Article


Azure PowerShell 0.8.3 Released

Just like anything that is part of Microsoft Azure, PowerShell seems to receive frequent improvements with constant updates. Azure PowerShell is built specifically to handle automation of Azure...

View Article


How to Generate Random Names & Phone Numbers with PowerShell

When you need a data set for testing or demonstration, and that set needs to represent Personally Identifiable Information (PII), you generally don’t want to use real data that represents actual...

View Article

Problem Changing Drive Letter

Hi all,I'm having issues trying to change a Drive letter of external drives. The script I use is below.$drive = Get-WmiObject -Class Win32_Volume -Authentication 6 | where {$_.DeviceID -like...

View Article

cannot create cab file

I got this error when creating cab file following the script below:New-Object : Retrieving the COM class factory for component with CLSID {00000000-0000-0000-0000-000000000000} failed due to the...

View Article

Need to get a users MemberOf and the groups ManagedBy as variables.

Hey,Working on a script to disable user accounts, and i got a request to add a function so that everytime a user gets disabled the script sends a mail to that users boss/bosses.Since we have all bosses...

View Article


Incredimail recovery

IncrediMail recovery tool first scans the corrupt file, then extracts data items from it and finally saves the recovered messages. The highlighting feature of this utility is that it not only restores...

View Article

Restart multiple Azure VMs

Hello,I am trying to restart multiple VMs in parallel. But for some reason the code doesn't work. I can see proper messages from the Write-Host (proper name and serviceName) but the restart is not...

View Article


Powershell and Regular Expressions

Hello All,I need to use regular expressions within my powershell script to match a specific string of text but I am unsure how to do so, I basically need a pattern that matches the following:'\\Any...

View Article

Get focus on .NET pop-up window

Hello AllI have written a nice little PS script that creates a series pop-up boxes (.NET) that prompts the user for keyed in information. I am using this method:[void]...

View Article


Trouble with passing the name of a file to a variable

Hi I'm trying to pass the name of a file to a variable but I get an error that the file cannot be found. However if I use the variable with the actual file name it works.  #$FileName =...

View Article

I need help modifying a script

I've been using this script to add domain users to local computer groups one at a time but I've been tasked with adding the primary user of the computer to the Remote Desktop Users group on their...

View Article

PowerShell Studio 2014: Code Formatting

One of the new features we added to PowerShell Studio 2014 is code formatting. PowerShell Studio 2014 will now beautify your script while you type or when you paste content.Read More

View Article
Browsing all 6937 articles
Browse latest View live