Quantcast
Browsing all 21975 articles
Browse latest View live

PowerShell Remoting [CredSSP]: HTTP 500 from WinRM Service

I started getting HTTP 500 messages from the Windows Remote Management (WinRM) service on all of my test Windows Server 2012 systems, butonly when trying to use CredSSP (Credential Security Support...

View Article


[15.00.670.4000] [PS] [C#] [Windows]: PowerShell Runspace to Exchange Online...

I have an application that programmatically invokes PowerShell commands on Exchange Server. Connecting the app to Exchange online server outlook.office365.com is successful, and invoking individual...

View Article


Script running differently in PowerShell ISE vs. PowerShell command line. IF...

Hello.  I've been trying to figure this one out.  I wrote the script in ISE then scheduled it to run but it did not run as expected.  When i test run it in ISE it runs fine because the IF commands run...

View Article

Sensational! Discovering Useful Console Commands.

function Get-ConsoleCommand { $ext = $env:pathext -split ';' -replace '\.','*.' $desc = @{N='Description'; E={$_.FileVersionInfo.FileDescription}} Get-Command -Name $ext | Select-Object Name,...

View Article

Sensational! Listing Windows Updates with PowerShell.

$Session = New-Object -ComObject Microsoft.Update.Session $Searcher = $Session.CreateUpdateSearcher() $HistoryCount = $Searcher.GetTotalHistoryCount() $Searcher.QueryHistory(1,$HistoryCount) |...

View Article


Using Powershell to run ExBPACmd

i am trying to set up a powershell script to run ExBPACmd and output to a file and on top of that it would be great if i could get it to email me when done.Has anyone tried this or have ideas on how? i...

View Article

Problems with variables

Hello.So, I've been working with Powershell for about a week.  Finally decided to dive in, and I'm stuckWhat I'm trying to do is grab all the services running as a domain account and run that through...

View Article

Using a variable for $db.SetOwner

Does anyone know how I can use a variable for this?$owner = "someowner" $srv = new-Object Microsoft.SqlServer.Management.Smo.Server($destinationInstance) $db = New-Object...

View Article


Enter-PSSession UriFormatException

I am attempting to install Remote Desktop Services in Windows Server 2012 and am getting a fail on "Specify RD Connection Broker Server". The compatibility check failed with "Unable to connect to the...

View Article


Help with putting together a list of AD computers

I am trying to put together a list of servers on our domain that will list the server name,  description, and the OS version.  I am having trouble adding multiple filters in.  So far i have a list of...

View Article

AD users that have never logged on showing their passwords are pre-expired

Hi, I trying to get information about never logged users in AD on showing their passwords are pre-expired, could someone verify script below, is it fine or I should add anything else?get-aduser...

View Article

Get folders size on multiple users

Hi i got a script to find the folder size of multiple users and create a new object with desired properties.$users = Get-ChildItem \\myserver\homefolders | select name $outfile = @() foreach ($user in...

View Article

change DNS script, can't make it update description variables

My environment is a static IP one and I must change the DNS settings on all the WinXP and Win7 clients. I pretty much have the gist of the script down except maybe part of the loops.  The first loop...

View Article


Search for string in Array

Hi,I've made a start, I want to search for a process name running on many servers, here is what I have# exe's to check $1 = "jews_did_wtc.exe", "KMS.exe","fud.exe",...

View Article

How to run a power shell scipt in a remote pc

Hi All,Below is my code to execute powershell scripts wih aguments using C#. Now i want to run scripts in a remote pc. In the method i will be passing remoteserver and credentials public static...

View Article


Trigger a Script on On Saturdays

I'm looking at writing a script that only fires off an email when it's either the first or second Saturday of the month..All other Saturdays of the month can be ignored. The issue I'm having is that...

View Article

Switching between DHCP & Static IP in Powershell

I am looking to run a Power Shell script that does the following:1. Determine the active NIC and import it. Currently I am able to find the active NICs with this command -Get-WmiObject -Class...

View Article


Remote PowerShell Execution

We have an ADFS environment which our AD has a one-way sync with O365. Any changes we have to make, we have to do in AD. One of our consultants supplied us with two commands that allow us to force a...

View Article

How to move huge amount of folders to limited number of folders

Dear PS gurus,I tried to searched my question online but didn't get what I need.Thanks very much:Suppose there are lots of folders insides a root folder(namely, D:\) with different sizes (but all less...

View Article

What effect does -force have on Format-List?

What effect does -force (in general) have on Format-List?For example, see the difference in these two commandsfl -inputobject $profile -force fl -inputobject $profile

View Article
Browsing all 21975 articles
Browse latest View live