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

windows 2012 & PowerShell commands

I was told in June while waiting in line at TechEd that when you execute a command in windows 2012 it is stored in a PowerShell format somewhere in a directory.  Does anyone know where this folder...

View Article


searching for info about CSV files

please excuse my in-experience. im spending lots of time working with powershell and im learning a lot. im in the process of creating scripts in sapien powershell studio. im learning how to do things...

View Article


Image may be NSFW.
Clik here to view.

Remote powershell script fails to execute

ExecuteCommand(Directory.GetCurrentDirectory & "\psexec \\myservername -u username-p passsword %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe") Public Sub ExecuteCommand(ByVal Command...

View Article

Powershell moving files but backup the files before replacing

I have three directories: 1. RFC 2. Source 3. BackupRFC contains files and folders(that contain files) that I need to replace in the source folder but before I replace/move files I need to backup the...

View Article

File List ---Newbie

I am trying to create a msgbox that will list the file name and last modified date of the files in the folder.  This is my code so far:$Results = Get-ChildItem "C:\Temp" -recurseForeach ($Result in...

View Article


O365 mailbox move

Hi allUsing shell I can move mailboxes to 0365 by running the following cmdlets, I just need to manually add prem and cloud creds when prompted:$LiveCred = Get-Credential (ENTERS CLOUD ADMIN...

View Article

Get all users with job title "XYZ" and assign license with options "ABC"

Hello AllWe are in the process of a mass migration from on premise to O365, and as part of that I have the lovely task of assigning the licenses. As this is a phased roll out we are currently only...

View Article

Announcing PowerShell Information Server (PSIS)

Johan Akerstrom – PowerShell expert from Sweden – released a PowerShell module that can be used to start a PowerShell-based web server. He preferred to call it a PowerShell Information Server (PSIS)....

View Article


Leveraging PowerShell to seize control of a heterogeneous data center

Don't fight the trend of other virtualization platforms creeping into your data center. Businesses often need to lower costs or find alternatives, challenging IT pros to become just as heterogeneous in...

View Article


Batch File Question - Exit on Error

I have a batch file: StartFile. batcd /d %~dp0powershell.exe -File sp_script.ps1pauseI have sp_script.ps1$ErrorActionPreference;sqlcmd -b -S  myserver -d mydatabase -i sql_test_fail.sql | Tee-Object...

View Article

In search of help to create a CSV of Farm SP 2010 sites and the state of...

Good afternoon.I do not  yet think in PowerShell. I am famliar with various other scripting languages on other OS platforms and have been trying to learn how to use it with SharePoint 2010.I want to...

View Article

Preparing a string that contains both single and double quotes for PowerShell

I'm using PowerShell in a Microsoft Orchestrator 2012 activity.  Manipulating data from Microsoft SCOM 2012 Alert.  When subscribing to the Description string from SCOM alert, the string can contain...

View Article

Listing all URL targets on Desktop of multiple PC's

I'm trying to create a PS script, ultimately, that will find all the URL on a list of pc's, then based on if a target is found, change that target to a new target. The problem I'm having is that it is...

View Article


finding machines in AD

I have this code which users on this forum helped me write.   $sourceOU = 'OU=InactiveComputers,DC=Acme,DC=com'Set-QADPSSnapinSettings -DefaultSizeLimit 0$old =...

View Article

Select-String

Hi,I'm trying to search for two values in a text file and only return a list of the files that have those two values, so far I only get everything back, any ideas ? gci E:\test | Select-String...

View Article


Deploying a Desired State Configuration Web Host using PowerShell

One of the coolest features introduced in Windows Server 2012 R2 is packaged as part of the Windows Management Framework and PowerShell 4.0, a feature which is commonly referred to as Desired State...

View Article

Finding not used extensionAttributes

Hi there,anyone has a clue why the first PS command doesn´t return any extensionAttributes (in my example eA1) while the other one does. The point is that I need to find two extensionAttributes that...

View Article


convert Text to objects

My PowerShell skills are very limited and I was hoping to get some help.  I need to convert output text from a legacy CLI tool into objects so that I can better utilize Powershell's capabilities.  The...

View Article

Text in windows forms rich text box not updating properly

Not sure if this is the right place for this question. I have written a windows forms powershell script and I have a function in the script that updates a richtextbox that I have in the form.The...

View Article

parse strings

I've done a few google searches but would like some help on the following.   I need to read a .TXT file of computer names.   And then I need to grab just the first 3 characters of each computer name....

View Article
Browsing all 6937 articles
Browse latest View live