Questions tagged [powershell]
PowerShell is a cross-platform command line and scripting utility from Microsoft. Use this tag for questions about writing and executing PowerShell scripts ONLY. Programming questions specific to the cross-platform version PowerShell Core (Windows, macOS, and Linux) should be tagged [powershell-core]. Questions about system administration should be asked on Super User or Server Fault.
powershell
118,091
questions
0
votes
2
answers
916
views
How do I create an application in IIS 5.0 using powershell?
I've worked out how to interact with IIS 6.0, but I can't find anything on the net about how to talk to IIS 5.0 - if indeed it's even possible?
I would like to write a script to create a temporary ...
16
votes
4
answers
16k
views
Is it possible to customize error display in powershell?
I find the standard Powershell display of errors (red text, multi-line display) a bit distracting. Is it possible to customize this?
4
votes
3
answers
32k
views
Connecting to WMI: 0x800706ba errors on some machines (but not all)
When I try to connect to WMI from Powershell, ConfigMgr, or WMI explorer, I can talk to the majority of my computers, but some (maybe 30%?) return an 0x800706ba (RPC server is unavailable).
If I turn ...
8
votes
7
answers
11k
views
What's the best way to start and stop SQL Server from the command line?
I need to start and stop SQL Server from the command line. I am willing to write a small C# program if necessary, but I suspect that there's something (PowerShell, maybe?) that currently exists that ...
159
votes
6
answers
177k
views
What does the "@" symbol do in PowerShell?
I've seen the @ symbol used in PowerShell to initialise arrays.
What exactly does the @ symbol denote and where can I read more about it?
4
votes
6
answers
11k
views
how to create a cmdlet?
I have written my program in c# .net. I want to convert it in to a powershell cmdlet. I was instructed to use pssnapin and getproc programs. Can anyone plz help me out..
Regards
Arun
1
vote
1
answer
899
views
WMI/PowerShell Bug: why is CreateSite creating *two* sites all of the sudden?
I have a simple PowerShell script that uses WMI to create a web site on a Vista box. Yes, I know PowerShell has an IIS provider for working with IIS 7, but this script must also support IIS 6.0, so ...
0
votes
6
answers
491
views
About consistensy in the powershell scripting language, using .NET types
If I want to create a .NET object in the powershell I write something like the following:
[System.Reflection.Assembly]::LoadWithPartialName("System.Xml") | out-null"
$doc = new-object -typename ...
3
votes
3
answers
3k
views
.Net Windows Update Querying
I was curious if there's a .Net API that would allow me to identify what updates are pending for "Windows Update,"
failing that, is there a windows powershell command that can get it?
2
votes
3
answers
2k
views
Is it possible to write a script to easily deploy clr stored procedures?
I would like to include CLR stored procedure deployment in our deployment script (powershell at the moment), however I can't figure out a nice way to do this automatically.
I would have thought there ...
3
votes
3
answers
4k
views
AD group comparison - PowerShell
When using the following function (compare 2 user's group membership), I get results that do not make sense.
function Compare-ADUserGroups <br>
{ #requires -pssnapin Quest.ActiveRoles....
12
votes
5
answers
54k
views
Filter services when calling Get-Service
I did this in the past, and can't remember the correct command (I think I was using instring or soemthign?)
I want to list all the windows services running that have the word 'sql' in them.
Listing ...
4
votes
5
answers
1k
views
Data Warehouse Management Command Line Application - PowerShell or C# Console App
I'll preface this question by saying this is for a Microsoft only shop.
If you were to write a console app to manage a data warehouse what would you use:
1) Writing a custom environment for ...
7
votes
3
answers
5k
views
How to convert .cs file to a PowerShell cmdlet?
Can anyone help me to convert a C# .NET program to PowerShell cmdlet? I am very new to this area. Please help me to get out of this checkpoint!
Regards,
Arun
3
votes
2
answers
3k
views
quest powershell : how do you run scheduled task?
How do you run a scheduled task with Quest powershell snap in?