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

I have bitten off more than I can chew and can't see the forest for the...

I have written the following script but each fix I do breaks 2 other things.  For instance I am loading variable data to an .xlsx and it errored that the object was not a string.  So I added .ToString...

View Article


Delete array from within another array?

Hi I am new to PS and just trying to come up with ideas to get my head around it and want to know if the following is possible. I create a user defined array asking user to input highest number in...

View Article


Displaying a nested group hierarchy

I have an organization that loves nested groups in Active Directory.  I have found that nested groups can easily get out of control without good business practices and excellent documentation.  I have...

View Article

Errors of new-pssession -authenticate CredSSP

I ran the following lines on both the client and server. Enable-WSManCredSSP -Role client -DelegateComputer *Enable-WSManCredSSP -Role server Then the "new-pssession -authenticate CredSSP ..." command...

View Article

trying to add a tab to a string line for an Out-file

Hello again guys! I have a hash table and are trying to put a tab space for all my lines for formatting with out-file. I tried putting the `t but it does not work. Here is the script for just the lines...

View Article


Windows PowerShell cmdlets available in SharePoint Server 2013 Preview

This post gives information about Windows PowerShell cmdlets that are available in SharePoint Server 2013 Preview. Read More

View Article

Generating Random Passwords in PowerShell

In May of 2009, I wrote an HTML Application (HTA), RandPass.hta, that uses JScript code to conveniently generate random passwords (see "Random Passwords on Demand"). The HTA has four check boxes that...

View Article

Powershell – Measure Historical Command

Have you ever been working in a Powershell console and have a command run longer than expected? Did you wish that you had wrapped that command in a Measure-Command so that you could view execution...

View Article


How to find rogue services

I have a list of services that are allowed to run on a set of servers. What is the best way to find what services are running on a box that are not on my list?

View Article


Image may be NSFW.
Clik here to view.

Creating a MAPI profile with powershell?

Hi all Is it possible to create a MAPI profile with powershell - what I basically need to do is programmatically connect to a mailbox to remove some hidden messages stored within it? I am pretty sure...

View Article

Parsing variable

Hello I'm new in PS and 'd like to parse a variable (which is "computername") and apply a IP configuration following the name. For example : Computername is AAAABBCCC I'd like to handle : AAAA, If AAAA...

View Article

Image may be NSFW.
Clik here to view.

psremoting with windows 7 home premium

Hello, I try to make a New-Pssession between 2 computer with Windows 7 Home Premium but it doesn't work. Is the feature blocked for the home version?   PS WSMan:\localhost\Client> winrm.cmd...

View Article

delete a specific files from the harddisk

hi everyone I'm new to powershell and network administrator in our company we have a virus that is spreading in our computers and no antivirus can stop it I usually delete the file using powershell but...

View Article


Write log to csv file

Hi, In my script I try to write logs to a file. I use something like this in the processing loop: $sReport += "$fromValue,$toValue,$result`r`n" At the end, I do: $sReport | out-file "Report.csv" But...

View Article

Room Utilization Report

Hi, Is it possible to pull  the report of room Calendar utilization from exchange?   This is what the report should show the items below. However, we should be able to use the same process to report...

View Article


Cleaning up corrupted profiles in Windows 2008 R2

I am building a script for us to run on a monthly basis that will search the ProfileList key in the Registry for .Bak at the end of the users SID, and when found, then delete the key. There are a few...

View Article

Can someone please explain me how to backup files.

Hi, I'm new to the forum as well as PowerShell. Can someone please give me code example for the below scenario:I have files (which has latest files) in one directory/folder. I need to take the back-up...

View Article


managedBy property question

Hello, I need to set a particular AD security group as manager on multiple Exchange 2007 Distrubtion Lists. Please could someone point me in the right direction on how to script this via powershell?...

View Article

Automatic deletion of mailbox

hi experts, I want to know can we delete the mailbox using Excel or CSV, suppose if i mention the Initials,email address,displayName,UPN in Excel , so can we make the script that it checks the UPN and...

View Article

Passing variables to a Remote session

Scenario - remote Win2008R2 DC. This dc is connected to local domain but is also connected to remote domain. Require helpdesk users to query remote domain AD. I initially configured a batch file that...

View Article
Browsing all 8583 articles
Browse latest View live