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

Problem with my function's parameters.

Hi Guys,Sorry for my poor english, i'm french.I've a problem with a simple copy function like this one: Copie ('C:\TEST', 'E:\Name\SVG\')$TotalFiles $TotalFolderfunction Copie{param([string]$Source,...

View Article


creating Array

Hii have a simple question which i can't solve it now.$array = 1..100how can we achive that for something like this ?$array = PC1..PC100 thanks

View Article


Comment Based Help inside function messes up SYNTAX section of Get-Help

Hello,I'm learning PowerShell and I'm writing a function with parameter validation and parameter sets. When testing, I used Get-Help <myFunction> a lot to see how PowerShell interpreted my...

View Article

Image may be NSFW.
Clik here to view.

Need help combining two scripts

I'm trying to combine two inventory scripts and have it create just one Excel worksheet with all the information on it and have the worksheet named whatever the computer name is.I've been wrestling...

View Article

Set-ADObject Cannot find an object

I have the following scripts its erroring out and I'm not sure why.Import-Module ActiveDirectoryimport-csv "c:\test scripts\output-Users3.csv" | % {Set-ADObject $_.saMAccountName -replace...

View Article


PowerShell Connect to SharePoint Online

This article shows how to connect Windows PowerShell to Office 365 using a single Windows PowerShell window.Read More

View Article

PowerShell: How to add all users in an OU to a Security Group using...

I’m currently setting up a new system for a client and wanted to add all users in a specific Organisational Unit (OU) to a specific Security Group.Read More

View Article

Securing Citrix X1 StoreFront with Powershell

Next generation StoreFront was just released as Technical Preview. The new name is X1 StoreFront and the version number states 2.7.0.9.In this blog post I’m going to show you how to secure a new Citrix...

View Article


Making Scripts Check for PowerShell Version

Q. How can I create a PowerShell script that requries a certain version of PowerShell?A. If you are writing a PowerShell script that requires a certain version of PowerShell an easy way is to use the...

View Article


Write-Output or Write-Host in PowerShell

Q. Should I use Write-Host or Write-Output in my PowerShell?A. If you open a PowerShell window and type the following commands the result is the same for both, it tells you hello:Read More

View Article

CTW: Enable or disable Developer Dashboard with PowerShell

Sometimes your SharePoint environment leaks of performance or you encountering problems which are not directly clear or difficult to discover.Read More

View Article

Create ZIP archives with PowerShell and the Shell.Application COM object

If you search the web, then you’ll find no shortage of PowerShell scripts for creating ZIP archives. Most of these solutions use the .NET compression classes, where some scripts simply call...

View Article

Improvements to DSC v1

KB3000850, the November 2014 update rollup for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2, has brought several enhancements and fixes to the first version of DSC (initially released as a...

View Article


Configuration for removing older versions of a service

I am working on creating a DSC configuration for a cluster that runs a set of proprietary services that are installed via msi. I want to be able to ensure that any older versions of the service are...

View Article

RDP-TCP connections and certificates

Is there a powershell command that will install a certificate to the RDP-tcp connection on a remote server?  Sorry I have not been able to find anything on doing this, so here I am.  Thank you

View Article


Array of Array Question

HelloCan someone help, how would I do the followingI have thousands of text files, with the following data in each of them object-group network clisys_lca6_nets network-object 192.168.112.64...

View Article

Zenoss API Json getting a response from PowerShell Invoke-RestMethod

I did so well with the InfloBlox API, they have asked me to see if I can script out getting our server to work with the Zenoss (monitoring) server through the REST API.  It turns out that all of the...

View Article


Parsing @@Version output question

Hello,I am using Powershell 2.0 with SQL snapin loaded and trying to get the SQL server Version, version number and Edition.$ver = Invoke-Sqlcmd  -ServerInstance 'ServerName\InstanceName' -Query...

View Article

Migrate large folder structure/files

I need to migrate large folder structures.The target folder structure is not equal to the source structure.For one single folder (and sub-folders) I have created a csv file which I use as input file...

View Article

vmware powercli push installs

Is it possible that I can install .exe or .msi to my vm's using powercli.I want to use an installer then install it on the vm I specify. I also want to do this quiet so im not seeing the installer...

View Article
Browsing all 6937 articles
Browse latest View live