Tagged Questions
0
votes
1answer
28 views
Powershell - printing out during a loop
I have to go through an OU and remove all the memberOf groups for all users. The script I have works, but I cannot get it to print out when each user is processed. So when I run the script, it ...
0
votes
1answer
24 views
PowerShell Checks Script Output to HTML Issue
I have a checks script which I am converting to output to HTML.
It has a function that checks a websites response time. I can't for the life of me get the output to show in HTML. Any ideas?
# ...
0
votes
1answer
14 views
PowerShell HTML Output not displaying correctly
I have this PowerShell script which is outputting to HTML. Below is a snippet of the code.
#Services Check
Write-Host "Services Check"
$html = $html + @"
<h3>Services Checks</h3>
...
-4
votes
2answers
37 views
PowerShell Convertto-HTML Button [closed]
Is it possible to addin a hyperlink / button to an outputted Powershell script. I want this button to link to a batch file.
0
votes
1answer
43 views
Powershell Script - Services Running eq OK or list Services Not Running
I have this script which checks multiple servers for particular services running.
I need assistance or pointers on how to get it to not pull back running / not running response. I need to get it to ...
0
votes
2answers
55 views
How does a Powershell cmdlet work?
Specifically I need to know how the Restart-Service cmdlet works.
For e.g when I'm writing
Restart-Service myservice1, myservice2
I want to know how it flows.
Does it stop both services before ...
2
votes
2answers
74 views
Create Local User with Custom User Folder in Powershell
I am trying to create a new Win 2008 server local user and assign the user a different profile path. I don't want Windows to generate all the files under C:\Users\newUser, instead, I'd like to have ...
0
votes
1answer
30 views
What are the limitations of running a SQL script from a file in Powershell?
I have a rather complex SQL script that does several things:
Drops an existing database
Reloads the database from a backup
Sets permissions
A few other miscellaneous db-specific tasks
I've saved ...
1
vote
2answers
97 views
String comparison not working in Powershell function - what am I doing wrong?
Okay, I'm a powershell newbie, and probably making a stupid mistake; hopefully someone here can sort me out in a hurry. What I'm trying to do is make an alias of git commit which also logs the message ...
0
votes
1answer
106 views
PowerShell Convertto-HTML add data to column
I have this script
$a = "<style>"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color:black;}"
$a = $a + "Table{background-color:#ffffff;border-collapse: collapse;}"
$a = $a + ...
0
votes
1answer
122 views
How to schedule a powershell script for automating wack process through windows scheduler?
I am able to execute the below command from PowerShell prompt and command prompt, but I am unable to schedule it using windows scheduler.
powershell script code:
appcert.exe test -apptype metrostyle ...
1
vote
1answer
53 views
Why does this Powershell function return more than just true/false?
Function lyncNotFocused {
# We need to check if the Lync window (conversation?) has focus or not.
$hwnd = [WhichWindowActive]::GetForegroundWindow()
$proc = [IntPtr]::Zero
...
0
votes
1answer
45 views
Using the Get-EventSubscriber cmdlet in Powershell
I am having a problem for a script I am working on, I must have already dedicated a good 4 hours to this problem, so now I turn here. I have the follow code, shortened it for everyone:
while($true){
...
0
votes
1answer
143 views
Call VBScript With Return Value on Remote Machine With Powershell
I need to call a remote VB script from Powershell, and the VB script needs to run on the remote machine.
I have been using \$computer\root\cimv2:Win32_Process").Create(C:\test.vbs)
This works, ...
0
votes
3answers
528 views
Trying to export an array to csv using powershell (array objects are ; delimited and contain newlines)
Okay, so I have this array, which is essentially an Import-Csv of a CSV file. Each object in the array is an entire CSV row. The input file renders properly when I open it with Excel (The columns ...