Cannot run the script
Unlock-ADAccount | Set-ADAccountPassword -Identity -PassThru -NewPassword (ConvertTo-SecureString -AsPlainText "123456" -force)
when i copy it into powershell it works like a charm... but i wanted it to prompt me for password. and then promt me for the username i want to reset.
i have my MMC for the GUI users and computers interface, the shortcut is like this,
C:\WINDOWS\system32\runas.exe /user:administration\%username%adm "mmc.exe \\servername\Tools\Admin\Administration.msc"
are you looking for Read-host option from Shell?
I haven't tested - but this may give a dice
$id = Read-Host 'Enter SamAccountname'
$pwd = Read-Host 'Enter Password' -AsSecureString
Unlock-ADAccount -Identity $id | Set-ADAccountPassword -Identity -PassThru -NewPassword (ConvertTo-SecureString -AsPlainText $pwd -force)
Regards Chen V [MCTS SharePoint 2010]
Similar Messages
-
Here is my scenario - I have SCOM 2007 R2 and on certain agents I want to execute a script. One of the actions of that script is to access a secured web page using a username and password via integrated authentication (IE pop-up for auth).
The username and password that I need to use are unrelated to the Windows domain that the servers run in, meaning you can think of the website as if it were a public site (it isn't, but it has no security sharing with the domain where the agents run - no trust,
no nothing).
I can easily accomplish this by hard-coding the username and password within the script (powershell), however, I don't want to do this for security reasons. Here's a rough example of the relevant code:
$targetURL = "https://somehost.somewhere.something/filename.zip"
$path = "c:\downloads\filname.zip"
$wclient = New-Object System.Net.WebClient
$wclient.Credentials = New-Object System.Net.Networkcredential($uname, $pword)
$wclient.DownloadFile( $url, $path )
What I want is a way to pass the $uname and $pword variables to this script securely, with the script running on a schedule under SCOM. The SCOM agents run as localsystem and need to remain that way.
I currently use Run-As accounts and profiles for other functions where the entire script runs under the run-as profile, but I can't figure out how to extract the username and passwords, and doubt it's even possible.
To be clear, I cannot run the script under the given credentials as a Run-As account as those credentials are not known to the local server. I need to somehow pass the credentials to the script (other than hardcoding) or extract them from the run-as accounts.
I've looked at the get-runasaccount cmdlet and can see some of the info there, but don't see a way to re-use, pass-through, or extract the password for use in my scenario.
Any guidance? Can I get there from here?Hi, check this
http://social.technet.microsoft.com/Forums/windowsserver/en-US/ebfc706d-93be-4ca0-83e0-33d9e072fb97/powershell-script-monitor-with-encrypted-password?forum=operationsmanagerauthoring
But you should not specify runas account for your workflow, just reference Runas Username and Password from Profile and use simple authentication. (The same way as in article above)
So in the end your script will be executed by default action account but you'll pass username and password securely to your script. -
PSE 4.0 on Mac: cannot run postflight script
Built PSE 4.0 as root on 10.5.6, PPC G5 w/ Mac OS Extended (Case-sensitive Journaled) FS. Near end of build: "file missing" then "cannot run postflight script." Any ideas? Thanks.
Had you tried installing as a regular admin user? In any case, if this drive is also case-sensitive, that's where the problem lies.
-
Running the Scripts of Essbase in Server rather than in Client
Hi,
We have Scripts which run for different Loads like INK/TONER/FAST etc. The Essbase Version we use is 11.1.2.2.
The content of the Scripts are as below.
INK.cmd
del U:\FAST\Logs\Ink_Assumpt_Extract.log
call C:\Hyperion\products\Essbase\EssbaseClient\bin\startEsscmd.bat U:\FAST\sub\sub\Ink_Assumpt_Extract_FAST.cmd
cd U:\FAST\data\
del Ink_Decay_Rates.OUT
move Ink_Decay_Rates.dat Ink_Decay_Rates.OUT
del Ink_Pen_Price.OUT
move Ink_Pen_Price.dat Ink_Pen_Price.OUT
del INKASM10.OUT
move Assum10.dat INKASM10.OUT
To run the above Script the User will install the Essbase Client in his PC and startEsscmd.cmd is executed as they will map the Folder to their PC using U Drive Version. This folder exists in Server.
Now the requirement is to change the Script running with User depending on Essbase Client. We need change the Script to run in Server itself when the users runs the script.
I want to execute this StartEsscmd.bat with the one available in Server as the below one
call F:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startEsscmd.bat U:\FAST\sub\sub\Ink_Assumpt_Extract.cmd . Rather than users installing Client.
Is this how we can make the script to run in Server itself. Or any other process. Please help on this.
Regards,
NaveenHello Experts,
These batch scripts are dependent on Informatica Environment as well. Once all the Essbase batch files runs there will be data files in DAT Folder and using the timestamp of current month these data files will be send to Informatica Env and there one Job runs which will convert all the .OUT files into a .DAT file and load into DB. Its the Process.
Now we cant change the entire process but need to get rid of Essbase Client dependency.
All i want to know is if we change the path of the files from
call C:\Hyperion\products\Essbase\EssbaseClient\bin\startEsscmd.bat
to
call F:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startEsscmd.bat
or
call %ARBORTPATH%\bin\startEsscmd.bat
will the files runs in server side. I tried with this but getting an error saying
System cannot find the path specified. Please help.
Regards,
Naveen -
Powershell Change date to the first day of last month whenever i run the script.
If I run the script on 2/4/2013 or any other day in February I want the date to be change to 1/1/2013. I am replacing date on line 59 with this value.
Get the content of the CMS Script.
$CMSReport = Get-content C:\reports\CMSReport.acsauto
Go to line 59 and replace the date for Last Month date.
$CMSReport[58] = $CMSReport[58] -replace "([1-9]|0[1-9]|1[012])- /.- /.\d\d", [datetime]::Today.ToShortDateString() $CMSReport | Set-Content C:\reports\testCMS.acsauto
Run the CMS script
Invoke-Expression -command "c:\reports\testCMS.acsauto"PS C:\> $lastMonth = (get-date).AddMonths(-1)
PS C:\> $firstDayOfLastMonth = get-date -year $lastMonth.Year -month $lastMonth.Month -day 1
PS C:\> "{0:yyyy-MM-dd}" -f $firstDayOfLastMonth
2013-01-01
Bill
Hello AbqBill,
Thanks for getting me there. I am a lot closer to the final goal. I input what you suggested and I am getting different results as you. here what I did.
$LastMonth = (Get-Date).AddMonths(-1)
$FirstDayofLastMonth = Get-Date -year $LastMonth.year -month $LastMonth.month -day 1
$CMSReport = Get-content C:\reports\CMSReport.acsauto
$CMSReport[58] = $CMSReport[58] -replace "([1-9]|0[1-9]|1[012])[- /.]([1-9]|0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d", "{0:dd/MM/yyyy}" -f $FirstofLastMonth
$CMSReport | Set-Content C:\reports\testCMS.acsauto
I get 12/1/2013. Which bring me to 2 questions. How will this solve when it is January and it has to put last month last year? and why is it going back two month instead of 1? -
Data access error while running the script in fdm workbench script editor
Hello Experts,
I have been getting the error when i run the script in script editor of fdqm workbench client.this is the error
-2147467259 Data access error and it is navigating the error at line 30 about this script "Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)"
Please revert me asap where i should load the data from peoplesoft to one of my planning database through fdm.
Thanks in advance...Hi,
Thanks for your suggestion's here i am going to run the datapump script so while i am running in workbench it is throwing data access error.So as you guy's suggested i created one import format and added this script to that import format which is added to one of my location even it is throwing the same error.I am getting the error at this sentence "strWorkTableName" I want to know what is this where it reflect's?So my question is Is there any difference while running data pump or integration script.Please let me know a detailed navigation steps to run this script's with out data access error to run these kind of scripts.
Note:Again my target is to load the data to planning database through fdqm which i am doing through sql statement's.
Suggest your valuable suggestion's
Thanks in advance...
I am getting the error at this sentence "strWorkTableName" I want to know what is this where it reflect's? -
I get a window pop up after every click into a new site that reads : Safari is no longer responding because of a script on the webpage " ". Do you want to stop running the script, or let it continue? If I click on continue it just continues, stop, it stops. How to correct this annoying message?
Disable Javascript for those webpages. Note, your Javascript is probably antiquated by now. Try a different web browser, or contact the website and let them know they aren't as accessible as they could be*:
http://www.macmaps.com/browser.html -
Oracle 11gR2 RAC: Running the script root.sh problem
Folks,
Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
I have been installing Grid Infrastructure using runInstaller from step 1 to step 9 of 10 in both VM rac1 and rac2.
Now, I am running the script root.sh in VM rac1 and rac2 as below:
[root@rac1 /]# /u01/app/grid/root.sh
Output:
CRS-4123: ohasd is starting
FATAL: Module oracleoks not found
FATAL: Module oracleadvm not found
FATAL: Module oracleacfs not found
ACFS-9121: Failed to detect /dev/asm/.asm_ctl_spec
ACFS-9310: ADVM/ACFS installation failed.
ACFS-9311: not all components were detected after installation
'UpdateNodeList' was successful.
[root@rac1 /]#
[root@rac2 /]# /u01/app/grid/root.sh
Output:
CRS-4123: ohasd is starting
FATAL: Module oracleoks not found
FATAL: Module oracleadvm not found
FATAL: Module oracleacfs not found
ACFS-9121: Failed to detect /dev/asm/.asm_ctl_spec
ACFS-9310: ADVM/ACFS installation failed.
ACFS-9311: not all components were detected after installation
Start of resource "ora.asm_init" failed.
Failed to start ASM.
Failed to start Oracle Clusterware Stack.
[root@rac2 /]#
As we see the output above, rac1 and rac2 get the same problems. in addition, rac2 fails to start ASM and Clusterware stack. Thus, I have 2 questions:
First, the common problem for rac1 and rac2 :
1)Module "oracleoks, oracleadvm, oracleacfs" not found
2)/dev/asm/.asm_ctl_spec not detected
3)ADVM/ACFS installation failed
Do the above 3 factors affect Grid and DataBase Installation later ? If yes, how to solve these problems ?
Second, how to start ASM and Clusterware stack in rac2 ?
Thanks.you have 2 options:
1. OEL 5.6 comes with 2 kernels, the original Red Hat, and Oracle UEK, you can choose not to use UEK
or the one i would recommend:
2. Upgrade Grid Infrastructure,
*11.2.0.3.1* (patch 13348650, released about a 1 month ago) supports ACFS on UEK (starting with 2.6.32.200 IIRC) -
I have to run a script file with 150 sql commands to test the integrity of the database and output into an outfile.Is there any way to send the output results with sql syntax and its corresponding number.Thanks in advance for help.
Modify the script to add something like
PROMPT Statement 1before each SQL statement. Prior to running the script, issue
SPOOL <path>/outfile.lsand after the script is done, do
SPOOL OFF -
Dear Sir,
While i am calling Excel function through asp.net using Excel 2003 i was not facing any kind of issue it's working fine but while i am calling Excel functions through asp.net using
Excel 2010 i am facing an issue even after enabling the micro in settings . issue is
"Cannot run the macro 'YIELD'. The macro may not be available in this workbook or all macros may be disabled." please solve this as soon as possible .
Thanks & Regards
Sanjeev// I made a singleton class and calling that class to access Excel functions
Public Class Singleton
Private Shared objexcel As Excel.Application
Private Shared lock As New Object
Private Sub New()
System.Console.WriteLine("Instance of Singleton class created at : " & Now())
End Sub
Public Shared Function GetInstance() As Excel.Application
SyncLock lock
If objexcel Is Nothing Then
objexcel = New Excel.Application
objexcel.RegisterXLL(objexcel.LibraryPath & "\Analysis\ANALYS32.XLL")
End If
Return objexcel
End SyncLock
End Function
End Class
// Common Function for yield
Public Sub CalculateYield( _
ByVal YTMDate As Date, ByVal FaceValue As Double, ByVal Rate As Double, _
ByVal NonGovernmentFlag As Boolean, ByVal RateActualFlag As Boolean, _
ByVal MaturityDate As Date, ByVal MaturityAmt As Double, _
ByVal CouponDate As Date, ByVal CouponRate As Double, _
ByVal CallDate As Date, ByVal CallAmt As Double, _
ByVal PutDate As Date, ByVal PutAmt As Double, ByVal intFrequency As Int16, _
ByVal strOption As String, ByVal dblResult As Double, ByVal strSemiAnnFlag As String)
Try
Dim decMarketValue As Double
Dim intBasis As Int16
decMarketValue = IIf(RateActualFlag = True, Rate * FaceValue / 100, Rate)
decMarketValue = decMarketValue * 100 / FaceValue
decMarketValue = objCommon.DecimalFormat(decMarketValue)
MaturityAmt = MaturityAmt * 100 / FaceValue
MaturityAmt = objCommon.DecimalFormat(MaturityAmt)
CallAmt = CallAmt * 100 / FaceValue
CallAmt = objCommon.DecimalFormat(CallAmt)
PutAmt = PutAmt * 100 / FaceValue
PutAmt = objCommon.DecimalFormat(PutAmt)
intBasis = IIf(NonGovernmentFlag = True, 3, 4)
If strOption = "Y" Then
With Singleton.GetInstance
If MaturityDate <> Date.MinValue And MaturityDate > YTMDate Then
dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
intFrequency, intBasis), Double)
dblYTMAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
dblYTMSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
'End If
dblYTMAnn = dblYTMAnn * 100
dblYTMSemi = dblYTMSemi * 100
Else
dblYTMAnn = 0
dblYTMSemi = 0
End If
If CallDate <> Date.MinValue And CallDate > YTMDate Then
dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
intFrequency, intBasis), Double)
dblYTCAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
dblYTCSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
'End If
dblYTCAnn = dblYTCAnn * 100
dblYTCSemi = dblYTCSemi * 100
Else
dblYTCAnn = 0
dblYTCSemi = 0
End If
If PutDate <> Date.MinValue And PutDate > YTMDate Then
dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
intFrequency, intBasis), Double)
dblYTPAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
dblYTPSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
dblYTPAnn = dblYTPAnn * 100
dblYTPSemi = dblYTPSemi * 100
Else
dblYTPAnn = 0
dblYTPSemi = 0
End If
End With
End If
Catch ex As Exception
Throw ex
End Try
End Sub
// call yield function
GlobalFuns.CalculateYield(datYTM, decFaceValue, decRate, blnNonGovernment, blnRateActual, datMaturity, decMaturityAmt, _
datCoupon, decCouponRate, datCall, decCallAmt, datPut, decPutAmt, Val(Hid_Frequency.Value
& ""), "Y", 0, "")
this code is working in Excel 2003 but it's not working in Excel 2010
//Error is
Cannot run the macro 'YIELD'. The macro may not be available in this workbook or all macros may be disabled. -
Do you want to run the script? Yes.
I'd like to be able to run a script without having to confirim that I want to run the script.
"You are about to run a script in Adobe InDesign CS5. You should only run scripts from a trusted source.
Do you want to run the script?"
Is there a way to execute the script without having to click this?I should have clarified that I want to execute the file externally, through a BAT file. I'm trying to eliminate all GUI steps. Essentially I have a set of routines I'd like run once a day, it would be ideal to run them outside of office hours as I'm dealing with the files and InDesign in other ways throughout my workday.
However as you pointed out if you run the script through the Script Panel there is no dialog asking for confirmation, so it must be possible to execute a script without the dialog. -
Could not run the script. This command requires an active document.
Hi,
I'm receiving a confusing glitch running a batch process in
FW MX 2004.
I want to resize images in one folder and export them to
another. I step through the batch wizard and on commencement of the
batch receive an error:
quote:
Could not run the script. This command requires an active
document.
FW is telling me it can't run the commands on empty
documents, yet the batch is running on all images selected using
Add All during the batch wizard. Confusing. Similar batches have
worked fine in recent days.
Any ideas?
Thxtkatcher wrote:
> Thank you. Some of them had brackets and percentage
marks.
You are welcome.
E. Michael Brandt
www.divahtml.com
www.divahtml.com/products/scripts_dreamweaver_extensions.php
Standards-compliant scripts and Dreamweaver Extensions
www.valleywebdesigns.com/vwd_Vdw.asp
JustSo PictureWindow
JustSo PhotoAlbum, et alia -
Cannot run SQL script on Oracle Database 10g Express Edition
I'm trying to upload a script, and the file is being uploaded fine, but in the Script Editor window where I'm going to actually run the script, the entire file content is shown on one line and the whole edit area is in red. I'm not being able to run that script. Also if I create a new script from the editor, the edit area is again in red and I'm not able to save it. Please help me understand what's to be done so that I can run my SQL scripts.
I'd bet the database is down.
Try a login through sqlplus ("Run SQL Command Line" in the Oracle Express Edition 'Start' menu).
Do a CONN / AS SYSDBA
If you get a message about database or memory area not available, try STARTUP.
If that doesn't work, you are best off in the General Database forum or the Express Edition forum.
You'll probably get the most expert response in General Database, but the Express Edition forum can be gentler on newbies (as it is more accepted that questioners are not and do not have access to full-time DBAs). -
I have Macromedia Fireworks 3.0 and the install process doesn´t run! After the installation the message is: fireworks cannot run. the resource files are missing or damaged. I use Windows 8.1. Antworten auf Deutsch wären super!
As far as I know there is no download resource for older Macromedia programs and it is highly unlikely that one as old as version 3 of Fireworks will be able to work on a Windows 8.1 system. I was unable to get a Studio 8 version installation on a Vista system, and likely even an XP system (cannot remember that far back).
-
Why MicroSoft 2000 SR needed while running the script using test manager???
hi all,
whenever I trying to run a script using test manager,one POP-UP comes which starts installing MICROSOFT 2000 SR.
and in few seconds it complaining for some missing component,
can any body tell me why it is happening.
what is the need of Microsoft 2000 SR while running the script in test manager.
tnx
USOniUSoni
I have seen that problem happening before, even that i was never able to figure out why, something that you can try is changing the service log in credentials for both:
Oracle Application Testing Suite Agent Service
Oracle Application Testing Suite Application Service
and use a proper user with admin rights.
let me know if that helped
Regards
Alex
Maybe you are looking for
-
Can I download to time capsule?
Can I use time capsule like a normal hard drive. I want to be able to stream movies from TC to other devices.
-
I have purchased a tv episode which would not download. I also cannot delete it- it seems to have frozen. The same has happened when trying to download a movie. Now the comment comes up "not enough storage space to continue download". This has render
-
Hi, I've been looking everywhere to find out what options are available (if any) to create a PDF in PSE 7. I know how to save a single page, or multi page PDF, but I can't seem to find much options for making the PDF smaller in size. One problem I ha
-
MySQL Jdeveloper 10.1.3 Create Entity Object problem
Hi, when I try to add new Entity Object in model i get: Error returning tables com.mysql.jdbc.Ststement Exception: java.lang.ClassCastException Exception Stack Trace: java.lang.ClassCastException: com.mysql.jdbc.Statement at oracle.jbo.server.Or
-
Hello experts, I wanted to ask a question regarding the constraints of a source table. So I made a constraint where I check 'where varA > 0'. When I test this constraint it gives me 1 error and that's good. But in my Control tab of my interface there