Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

How can i export the results for this loop

Hi all i wrote a script to do nslookup for a list of web sites here is the code i wrote $servers = get-content "C:\NSLOOKUP.txt" foreach ($server in $servers) { $addresses =...

View Article


PowerShell Script Log issue

Hi,This is my first thread. I am having issues with a disabling user script. The script appears to do everything except that it logs a . instead of the SAMNAME. The script is below:$USERNAME =...

View Article


Best way to ensure combinations from the ValidationSet parameter attribute...

I have an advanced function I have been working on that looks something like this:Function Do-Something { [cmdletbinding()] Param ( [Parameter(Mandatory=$true, [ValidateSet('Yes', 'No', 'Y', 'N',...

View Article

Prepare Drive Array

I'm working on creating a Powershell script that will ultimately become a post install script on newly provisioned virtual machines, for both VMware and Hyper-V.  My first task is to deal with any...

View Article

PLEASE HELP: Creating a New Mail Contact without a default email address...

I am currently in the process of creating a site that will automate a lot of the processes that we do here where I work and in the middle of creating something that would be a proof a concept for our...

View Article


Once Again: How do you insure that "Allow the computer to turn off this...

This really frustrating, all of the suggestions I've found, except for manually changing the settings through the registry fail. Even the "official" powershell script posted by Microsoft doesn't work:...

View Article

Copying and pasting files from Win 7 to XP via Cmd Prompt

HelloI have managed to network a Win 7 PC and an XP PC (both wireless and using the same home router).I aim to copy and paste all those files I have worked on over the last 24 hours from my Win 7 PC to...

View Article

Powershell Connection to Database: Issues Writing Data back to Database

Afternoon;I'm updating a script file we have that we use in a remote assistance application and I am able to get into a database to read the information that I need but now I need to write back to the...

View Article


Executing powershell script on web page

Hi everyone,I created a ps1 file and now I'd like to put it on our intranet so user can executes it by clicking on the button or on the link. The research leads me to use invoke-expression but I don't...

View Article


Members of a group

Im looking for a small script that when ran, will prompt for a group, any group in AD.  After the group is manually supplied the script will extract all group members to csv.Thanks in advance

View Article

PowerShell 4 Get-AD Function Issues

I have just been upgraded to Win8.1 at work, and have my PowerShell scripts that worked happily on Win7 (with PowerShell v3). Most work, but I can't seem to get any 'Get-ADUser' or 'Get-ADComputer'...

View Article

Powershell - Creating hashtable from arrays

Howdy,I am working on a script, and I have ended up with two arrays like so:$servers = @("ServerX","ServerY")$reportID = @(123456,098765)Given the two simple arrays above, how would I combine into a...

View Article

Clarification of scheduled task creation with PowerShell 4.0...

Hi all,I'm new to scripting so please forgive any poor terminology, etc...I've written two scripts which work perfectly when run manually.  The first creates a backup, the second deletes the same...

View Article


New Task with trigger options in powershell

Hello, i am trying to create a new task but i am not able to configure the advanced options like:- Trigger options: Repeat task every *** for a duration of ***  I know i have to use the...

View Article

powershell script modification help

i have powershell script available. it changes advertisement schedule. I am looking some one to modify the script. $d=New-CMSchedule -Start "8/11/2014 1:00 PM" -Nonrecurring Set-CMPackageDeployment...

View Article


How to format output

In below script how to Get output of server in red in HTML on which patches were not installed on 9/16/2014$server = Get-Content C:\Abhishek\uptime.txt ForEach ($servers in $server) { Get-WmiObject...

View Article

Array Losing Values

I have a script that is conditionally assigning a value of one to a cell of a multi-dimensional array as it loops through it. Count = 0 ClientData = Session ("ClientData") for each item in...

View Article


LastWriteTime help needed

HiI have searched around for a while and decided best to ask.The Environment and what I have done thus far:I have a lot of computers that are part of 1 domainI have all of the computer names listed in...

View Article

Powershell to set SACL on files

Hello, I have the following code (it's a mixture of other code to set SACL on files and registry keys) to set SACL entries on files.  I'd like it set to Everyone Failure Full Control and Everyone...

View Article

i need script to email me the defragmentation analysis report for all servers...

i need script to email me the defragmentation analysis report for all servers (for all volume ) from input file.

View Article
Browsing all 15028 articles
Browse latest View live