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

PowerShell Elevate Rigths for Get-Process

Hello, I have a PowerShell script that I use to run a couple of things related to a remote server and processes.BTW - I'm very new to PS.Here are the snippets: (I dont run both, but either one serves...

View Article


Array of different psobjects...

I'm trying to export an array but can't get all colums out if they are missing for the first recordExample code to demonstrate the problem$MyArray = @()for ($i=1; $i -le 10; $i++){ $NewRecord =...

View Article


Implement Easiest Solution to Restore Windows XP BKF Files In Windows 2007 Os!

Before sometimes, I was encountering Windows BKF file corruption problem because my all XP created (.bkf) file has been damaged and dissolved due to unexpected virus attack. After corrupt BKF file, I...

View Article

Check if Computer object exists in AD ?

I have a text file containing 100 server names. I would like to push these into a script and test wheather the computer object exists or if it has been decommissioned (deleted). From the results i can...

View Article

Retrieve words from text file.

Below is an example of text lines from a log file.  How can I capture the domain\userid after the word (User) & the computer name after the word (Machine).Thank you in advance!...

View Article


Not enough quota is available to process this command.

Hi, I'm trying to run a script in a remote Powershell session and I get a 'Not enough quota is available to process this command.' error. The symptoms are identical with the one reported in this...

View Article

Powershell Secure String Encryption

I have a question about the AES encryption used by PowerShell's ConvertFrom-SecureString cmdlet when a key is specified with the -Key parameter.  If I specify a 256 bit key I would assume that...

View Article

Comparing Figures from two csv files, writing a 3rd file.

Hi, I have two csv files generated from a previous script which contain the following:File1:#TYPE...

View Article


PowerShell Remoting: On execution of a command to start an exe (wmplayer for...

I have a test bed in my lab consisting of a windows server 2008 running powershell 2.0. I am using that server to manage 50 clients  that are connected wired and wireless with the server. I am running...

View Article


script to populate ProxyAddresses and Mail attribute based on the...

Hi, I am trying to populate the ProxyAddresses AND mail attribute for ALL users based on their UserPrincipalName.Need help with the following: $UPN = Get-ADUser -Filter * |select UserPrincipalName$user...

View Article

Azure Automation

Q: What is Azure Automation?A: Azure Automation is essentially System Center Orchestrator Service Management Automation (SMA) hosted in Azure. It allows the execution of PowerShell workflows directly...

View Article

PowerShell DSC Comes to Microsoft Azure

For the past several years Microsoft has been building PowerShell hooks into every product that it produces. PowerShell is a powerful scripting language for sure, and as an IT Pro, if you're not...

View Article

Send on behalf

Can I send an SMTP message from a Powershell script that performs a "send on behalf" operation?The Send-Mailmessage Cmdlet doesn't seem to offer that capability (using the "from" option tries a "send...

View Article


Script to test-connection and check if computer object exists in AD

Hello guys, I've list of 3600 machines and i've to test connectivity and existence in AD as i'm a beginner in PS , I'd like to request some help. I have already script to ping machines which are...

View Article

Bulkadd Users to Group - deep level ou

Hi.I am trying to bulk-add users in a txt-file to a group. However both users and group are placed in a sub-ou so when I run my script the group and users cannot be found.Also - I would like the user...

View Article


Cannot access another machine Folder Disk Space

Am running my below comand line in my script.ps1 - to find the disk space of the remote machines (listed in servers.txt in my current folder)Get-WmiObject Win32_LogicalDisk -filter "DriveType=3"...

View Article

ad user export wont return all values of select-object

Hello,this is my code:$When = ((Get-Date).AddDays(-7)).DateGet-ADUser -Filter {whenCreated -ge $When} -Properties * whenCreated | Select-Object givenName, sn, SamAccountName, mail | Export-csv -path...

View Article


Running a exe a set number of times...

Hello,Have been trying to find a way to get powershell to start a program (exe) a defined number of times. Sometimes I want to run 1 or 2 instances, sometimes over 20. Is there a way to define this...

View Article

New Scripts list remove members

good afternoon Working for a private bank and need to develop a script that do the following. I'm starting to develop in Power Shell script. I need the script to check my machines in the network...

View Article

Query Azure Storage with PowerShell but without the SDK or Cmdlets

I had a need to query Azure Storage via PowerShell, but I was not guaranteed that the machines I'd be running from would have either the Azure SDK or the Azure PowerShell Cmdlets installed.The script...

View Article
Browsing all 8583 articles
Browse latest View live